OpenLLM-France/wikimedia huggingface dataset:
# Science: An Elementary Teacher’s Guide/History
## Early Chemistry

Early civilizations, such as the Egyptians Babylonians, Indians amassed practical knowledge concerning the arts of metallurgy, pottery and dyes, but didn't develop a systematic theory. A basic chemical hypothesis first emerged in Classical Greece with the theory of four elements as propounded definitively by Aristotle stating that fire, air, earth and water were the fundamental elements from which everything is formed as a combination. Greek atomism dates back to 440 BC, arising in works by philosophers such as Democritus and Epicurus. In 50 BC, the Roman philosopher Lucretius expanded upon the theory in his book De rerum natura (On The Nature of Things). Unlike modern concepts of science, Greek atomism was purely philosophical in nature, with little concern for empirical observations and no concern for chemical experiments. In the Hellenistic world the art of alchemy first proliferated, mingling magic and occultism into the study of natural substances with the ultimate goal of transmuting elements into gold and discovering the elixir of eternal life.Work, particularly the development of distillation, continued in the early Byzantine period with the most famous practitioner being the 4th century Greek-Egyptian Zosimos of Panopolis.Alchemy continued to be developed and practised throughout the Arab world after the Muslim conquests, and from there, and from the Byzantine remnants, diffused into medieval and Renaissance Europe through Latin translations. Some influential Muslim chemists, Abū al-Rayhān al-Bīrūnī, Avicenna and Al-Kindi refuted the theories of alchemy, particularly the theory of the transmutation of metals; and al-Tusi described a version of the conservation of mass, noting that a body of matter is able to change but is not able to disappear.
# Science: An Elementary Teacher’s Guide/Kinematics

Kinematics is the study of motion without understanding the cause of motion.
Basic terms for understanding kinematics:-
Distance and displacement:-
# ROOT/Table of Contents
## Getting Started

* ROOT/Getting Started/Installing ROOT
* ROOT/Getting Started/Many Ways to Use ROOT

## Handling Data

* ROOT/Handling Data/ROOT Data Types
* ROOT/Handling Data/Files
* ROOT/Handling Data/Trees

## Exercises

* ROOT/Exercises
# ROOT

This will become a book about ROOT. A C++ based free data analysis software and library developed at CERN. (Not to be confused with the root user on UNIX systems. It's got nothing to do with that one.)

## What we have so far

* Table of Contents

## Help Writing this Book

* What is this book intended to become?
* Outline and some decisions taken so far
* Authors of this Book

## Useful Sources

* Web site at CERN
* Official user's guides

## Templates

* Template:ROOT/Template Documentation
* Template to embed an exercise
* Meta template for the following three templates
* Template for ROOT output
* Template for ROOT input line
* Template for ROOT input line for code executed later (e.g. loops)

## Problems

* Template:ROOT/Exercise/Documentation
# ROOT/Exercises

This page lists all exercises of this book. Doing all the exercises is an important part of getting the essence of this book.
* Exercise: Trying Interactive ROOT
* On an interactive ROOT session: Fill an array of 100 000 000 64Bit floating point numbers of the machine independent ROOT type Double_t with random numbers. Compute the mean of the array and print it to the console. Note the computation time.
* Hint: You can get random real numbers by creating a pointer to an instance of the TRandom class. (The constructor takes one arbitrary integer as initialization.) Then you can call the method TRandom::Rndm to get a simple pseudo random number uniformly distributed between 0 and 1. For example:
* TRandom *R = new TRandom(time(0)); // create a pointer to a new instance of TRandom in the heap
* cout << R->Rndm << endl;
* Exercise: Interpreted ROOT Macros
* Consider the problem solved in the previous exercise. Now write a script that does the same thing and execute it as interpreted macro. Does it run faster?
* Modify the script in a way that the user can pass the amount of random numbers to be created as a parameter.
* Overload the macro such that the amount of numbers can still be passed but if no parameter is given, 100 000 000 numbers will be generated.
* Exercise: Compiled ROOT Macros
* Use the script you've written before and modify it so it can be run as compiled macro via ACLiC.
* Make sure that both, calling with and without parameter, will still work.
* Can your script still be interpreted by CINT after you've changed it?
* How is the performance of the compiled macro for 100 000 000 numbers? What is faster for 5 numbers?
* Exercise: A Simple Stand-Alone Application
* Once again, consider the code you should have previously written to compute the mean of an array of random numbers. Now, last but not least, make it a stand-alone application and run it independently of any ROOT session. Make sure that passing parameters will still work. Check the performance of your application. Take also care that your modifications don't disturb interpretation or on-the-fly compilation by CINT or ACLiC.
# ROOT/about/Authors of this Book

If you contributed more to this book than correcting a few typos you're invited to add yourself to this list. This will
* make it easier for other authors to keep an overview about the team.
* give readers an idea what kind of people wrote this book.
| Author | Institution | Country | Occupation | Subject |
| 5gon12eder | Karlsruhe Institute of Technology | Germany | Student | Physical Chemistry |
# ROOT/about/goal

I happened to learn ROOT in a class at our university and liked it from the beginning. The software comes with extensive documentation at CERN's homepage. However, I found that this is hard to understand for beginners. It also seems that ROOT is a software written by particle physicists for particle physicists. This makes parts of the documentation difficult to understand for people who are not that much into this subject but simply want to use ROOT for their area of research. This is why I decided to start a Wikibook about ROOT.
This book should serve as a first guide to people who want to learn ROOT. It should be open to people from any subject dealing with data analysis. After reading this book and doing the suggested examples people should be able to use elementary features of ROOT for their individual purpose and gain more expertise by consulting the official documentation.
I don't think that it would be wise to incorporate detailed explanation of the various classes of ROOT. This is done in an excellent way on its homepage. This book should prepare the reader to understand the original documentation in its concise form rather than preparing the documentation for the reader.
A word about language: I'm not a native speaker of English but I decided that English is the standard language of both, science and programming, so it would be the best idea to write this book in English. I'm sure that everybody who needs ROOT for his or her work will also need English for it. So I hope that also readers and authors from others than the English Wikibooks will join and find this book useful.
I know that writing this book will be a whole lot of work and any contribution will be warmly appreciated. Let it become good!
             All the best
             5gon12eder (talk) 07:31, 21 November 2010 (UTC)
# Vectors
## Scalars vs Vectors

Scalars are numbers, or quantities which represent numbers, such as $7,x,y,e,\pi ,...$
Vectors are composed of a direction and a magnitude, or multiple scalar components, such as $\left\langle 3,4\right\rangle ,5{\hat {i}},3{\hat {i}}+4{\hat {j}},...$ The magnitude of a vector is found with the Pythagorean theorem, $\left\Vert {\vec {a}}\right\|={\sqrt {a_{x}^{2}+a_{y}^{2}}}$

## Vector Multiplication
### Vector-Scalar Multiplication

When a vector is multiplied by a scalar, each component of the vector is multiplied by the scalar, such as $a\left\langle x,y\right\rangle =\left\langle ax,ay\right\rangle$

### Dot Product

The Dot Product (or Scalar Product) of two vectors is given by $\left\langle a,b\right\rangle \,\cdot \,\left\langle c,d\right\rangle =a\,c+b\,d$. The dot product is equal to the cosine of the angle between the vectors, multiplied by the product of their magnitudes, and therefore the angle between the vectors can easily be calculated using $\cos {(\theta )}={\frac {{\vec {a}}\cdot {\vec {b}}}{\left\Vert {\vec {a}}\right\|\,\left\Vert {\vec {b}}\right\|}}$

### Cross Product

The Cross Product of two vectors results in another vector, normal to both initial vectors. The magnitude of the cross product is equal to the area of the parallelogram formed by the two vectors, or $\left\Vert {\vec {a}}\times {\vec {b}}\right\|=\left\Vert {\vec {a}}\right\|\,\left\Vert {\vec {b}}\right\|\,\sin {(\theta )}$
# ROOT/about/outline

This are just a couple of thoughts about the outline of this book. They're probably not the last words spoken about this and any suggestions and discussion will help improving it.

## Style

* Since this book will become a guide, a clear structure that directs the reader from one topic to the next seems preferable.
* A good navigation template (that ideally also does the categorization) should be developed and used in all chapters.
* The book should use a deep structure for its chapters.

## Content

* The book should not explain general basics of programming. (I.e. what is a "for" loop, etc.) We can assume that the reader already has some experience with object orientated programming. If not: there are good books on C++ etc. readily available on Wikibooks.
* On the other hand, we should not assume too much knowledge. Many people, especially students at my university, use ROOT as a tool to understand statistics, not to develop the ultimate super-performing data analysis application.
* The book should not focus on usage for particle physics but be general.
* Every topic should be accompanied by an example the reader can try immediately. This examples should be as simple as possible. In particular, they should be organized in a way that a reader can do them one after the other without assuming more advanced stuff.

## Formatting

* Class names are typeset as code (e.g. “The TTree is an essential ROOT class.”).
* References are usually given in the Wiki-Style using <ref>Author: ''Title.'' Publisher, Year, (additional information). However, since references to the ROOT online documentation will appear very frequently and this is "stable" source. Those are the only ones linked directly inline as in “see reference for more information”.
Please add more ideas or discuss the above points on the discussion page.
# Vector Functions
## Position
## Velocity

Velocity is equal to the derivative of position with respects to time, ${\vec {v}}={\frac {d}{dt}}\,{\vec {r}}$

### Tangent and Normal Vectors

The Tangent Vector is the unit vector tangent to the motion, ${\vec {T}}={\frac {\vec {v}}{\left\Vert {\vec {v}}\right\|}}$. The Normal vector, similarly, is the unit vector normal to the motion, ${\vec {N}}={\frac {\frac {d{\vec {T}}}{dt}}{\left\Vert {\frac {d{\vec {T}}}{dt}}\right\|}}$

## Acceleration

Acceleration is equal to the derivative of velocity with respects to time, ${\vec {a}}={\frac {d}{dt}}\,{\vec {v}}$
# ROOT/Handling Data/ROOT Data Types

There are a couple of standard data types like int, float, double, etc. you've probably been using so far. However, despite these universally used names, there is no general agreement, what these types actually mean. In fact, it depends on your machine and compiler, how a data type will actually be stored. For example, some older standards will assign 16 bit to the int type while newer environments will use 32 bit. This might be acceptable for some applications, for data analysis it definitely isn't. As one starts to deal with huge amounts of data, one should be concerned about economic memory usage. This means to chose a data type that is big enough but nothing bigger to hold the intended value with the needed accuracy. To provide this, the programmer must be sure that the chosen data type will actually be the same on any machine the code gets compiled.
To ensure this, a number of machine independent data types that will always have the same definition has been defined in ROOT. It is strongly recommended to use this types when programming ROOT.
| Type | Description | Size |
| Bool_t | logical value (0&#133;false, 1&#133;true) | ? |
| Char_t | signed integer value | 1 byte |
| UChar_t | unsigned integer value | 1 byte |
| Short_t | signed integer value | 2 bytes |
| UShort_t | unsigned integer value | 2 bytes |
| Int_t | signed integer value | 4 bytes |
| UInt_t | unsigned integer value | 4 bytes |
| Long_t | signed integer value | 8 byte |
| ULong_t | unsigned integer value | 8 byte |
| Float_t | floating point value | 4 bytes |
| Double_t | floating point value | 8 bytes |
Table 1: Some of the machine independent data types defined in ROOT. See ref. for all types.
# Pokémon Red and Blue/Soul Badge
## Fuchsia City

This large city hosts the Safari Zone and the next Pokémon Gym. However, you will also need to collect two more HMs that you cannot complete the game without. One of them is Strength, which allows you to move certain heavy boulders outside of battle. The other is Surf, which lets you move on water. Both of these HMs require a trip to the very back of the Safari Zone.
The Safari Zone is a series of four interconnected areas connected in a circle; you must traverse the entire area counterclockwise until you reach a dead-end. There you will find Gold Teeth on the ground, and a man inside the nearby house will give you HM 03 (Surf). This is difficult to accomplish in the time given to you when you enter; you may need to go through the Safari Zone twice. Surf lets you take to the oceans and finally travel over water.
What good are the Gold Teeth? In a house in the southeast corner of town you will find a man who cannot speak clearly. Give him the Gold Teeth and he will reward you with HM 04 (Strength). Strength can be used to push large, round boulders out of your way. Why not try it out on the one in this very room? Behind it you will find a Rare Candy.
In the house next to him is a man who will give you the Good Rod. This works like the Old Rod, except that it can catch something other than Magikarp. If you took the east path to Fuchsia, you will already have the Super Rod, which is even better.

## Fuchsia City Gym

This Gym is very deceptive. It looks like a number of enemy Trainers spaced out in an empty room. However, you cannot simply walk up and battle them, because there are invisible walls all over the place! The Trainer to your left when you enter is optional. To reach the Gym Leader, go to the Trainer to the right of the entrance, step to the right of him, and go north. You will encounter two more enemy Trainers. When you reach the back wall, walk behind the back of the enemy Trainer all the way to the left-hand wall, then go down. You will quickly run into an obstacle. You can bypass this by moving towards the enemy Trainer. After him, the path is simple. When you reach the end you will be standing next to an enemy Trainer in the center of the room. This is Koga, the Gym Leader.
Boss — Koga (•4950 reward)
* Level 37 Koffing
* Level 39 Muk
* Level 37 Koffing
* Level 43 Weezing
After you defeat Koga, you will receive the Soul Badge. Now that you have this Badge, the Defense stat of all your Pokémon will be boosted for the rest of the game. You will also be given TM 06 (Toxic). You now need to make your way back out by retracing your steps.
# Pokémon Red and Blue/Introduction
## Main Goals

The main goals of the player in this game are two:
* Capture all 151 Pokémon in order to complete the Pokédex.
* Win the eight Gym Badges from the Gym Leaders to access and win the Pokémon League.

## Game Start

The player receives one Pokémon from Prof. Oak, which must be trained to make it stronger in order to defeat other trainer's Pokémon in battle or to weaken wild Pokémon which can be captured with a special artifact called Pokéball.
Every Pokémon that wins a battle receives Experience Points, which allow it to grow, achieving new levels, learning new, more powerful movements, and even evolving into greater, bigger Pokémon.
To help the trainer in his mission, there are objects which can be used to restore health to Pokémon or cure them from Special Conditions such as Confusion or Paralysis.
# Pokémon Red and Blue/Safari Zone

The Safari Zone is a large area located north of Fuchsia City. It contains many Pokémon that cannot be found anywhere else.
You must pay a fee of •500 every time you enter the Safari Zone. You are given 30 Safari Balls, and are released into the Zone. When you throw your last Safari Ball, you are automatically teleported back to the entrance. Additionally, there is a time limit. Once you enter the Zone, the game will start counting “steps” (movements from one tile to another, triggered by pressing the + Control Pad). When you take your five hundredth step, you are teleported to the entrance.

## Catching Pokémon

You do not (and cannot) use regular Poké Balls to capture Pokémon in the Safari Zone. You use the Safari Balls instead. When you encounter a wild Pokémon, you must start throwing Safari Balls immediately, hoping for a lucky break. You are not permitted to battle the Pokémon in any way before you throw the Safari Balls. Naturally, the more desirable Pokémon are encountered less, and the better a Pokémon is, the more often it will escape from your Poké Balls.
You are also given Pokémon Food and a supply of rocks. When you encounter a wild Pokémon, you have the choice of throwing either. (You never run out of these items.) Throwing food will make the Pokémon more or less likely to stay inside a Safari Ball. Throwing rocks causes most wild Pokémon to flee.
# Signetics 2650 & 2636 programming
## A guide to programming the family of video game consoles based on the Signetics 2650 microprocessor and 2636 Programmable Video Interface

* A printable version of Signetics 2650 & 2636 programming is available.
* Introduction

### Reference

* Console Hardware
       System architecture ― Clock generation ― Processor ― Memory map ― PVI ― Sound circuits ― Hand-controller circuits
* 2650 processor
       Registers ― Program Status Word ― Reset ― Interrupts ― Instruction set ― Addressing modes
* 2636 programmable video interface
       PVI registers ― Objects ― Score ― Background grid ― Sound ― Analogue to digital conversion

### Tutorials - system elements

* Getting started WinArcadia ― Assembler ― Debugger
* Objects Programming objects
* Score Score programming ― WinArcadia PVI monitor & memory editor
* Programming colours Colour registers ― Colour codes
* Background grid Grid programming ― Bar extensions
* Sync to VRST Testing VRST ― Moving an object
* Sync to Object completion Detect object completion ― Reprogram objects ― Creating shapes, WithCarry, and Rotate
* Object collision
* Sound Sound
* Keypad and console buttons
* Joysticks
* Interrupts

### Tutorials - game elements

* Speed and animation
* Sound effects
* Music

### Tutorials - programming techniques

* BCD arithmetic BCD ― Decimal adjust ― Incrementing the score
* Indexed branching BXA and BSXA ― Creating a state machine

### How did they do that?

* Leapfrog screen programming
* Super Space Interton game, specifically the terrain
* Games that use interrupts

### Tutorial code

* Tutorial code - Contains the hardware definitions
* Getting started - An introduction to using WinArcadia
* Objects
* Score
* Programming colours
* Background grid
* Sync to VRST
* Sync to object completion
* State machine
* Interrupts

### Appendices

* Glossary
* Bibliography
* Analogue TV
* 2650 cheat sheet
* 2636 cheat sheet
* Background worksheet
* Development systems
* WinArcadia
* Pi2650
* PVI audio frequency chart
* Contributions
    Welcome — Local manual of style — Wiki snippets — Contributors
# Signetics 2650 & 2636 programming/BCD arithmetic
### Binary Coded Decimal

The natural way for a microprocessor to represent numbers and perform arithmetic is in binary format. Humans prefer decimal notation, so when a computer wants to communicate with us, it has to convert from one format to the other. Another option is to force the computer to operate on binary-coded decimals, where each decimal digit, 0-9, is represented by 4-bits. The other six numbers that can be represented by those four bits, A$_{16}$ - F$_{16}$ are meaningless, and this makes binary arithmetic more complicated than in a pure binary format. If for example we do the addition 8 + 4 in binary, the result is C$_{16}$ which is meaningless in BCD. To get the correct answer we must add six, giving 12$_{16}$. The '1' is carried to the next most significant digit.
The primary use of BCD in these video game consoles is for displaying the score, a number that is typically only incremented, so our discussion here will be confined to addition of BCD numbers. Should your game require subtraction, signed integer arithmetic or division, the Application Memo listed in the references below should help.

### Decimal adjust

The 2650 microprocessor has two features that aid BCD arithmetic. In addition to the Carry Flag (C) that registers a carry from bit 7, there is an Inter Digit Flag (IDC) that registers a carry from bit 3. There is also a special instruction, Decimal Adjust Register, DAR, that examines these flags after an arithmetic operation and makes appropriate adjustments to the high nibble, bits 4-7, and the low nibble, bits 0-3. In the case of the most significant nibble, it adds 10$_{10}$ if C is 0, and for the least significant nibble it adds 10$_{10}$ if IDC is 0.

### Incrementing the score

The program listed below adds an 8-bit number to a 16-bit number and will probably take care of most score-handling needs on these consoles. The MSB of the score is saved in 1F50 and the LSB of the score is in 1F51. Don't forget that the score registers, 1FC8 and 1FC9, are write-only, so the current score cannot be retrieved from them, it must be saved elsewhere.
The WinArcadia debugger can be used to step through this program to see how it works. The incremental value and the initial 16-bit value need to be set using the Memory Editor.
| 0000 1F0004 : 0003 17 : 0004 7620 : 0006 7708 : 0008 7501 : 000A 0C1F51 : 000D 0D1F50 : 0010 0F1F52 : 0013 8466 : 0015 8566 : 0017 7501 : 0019 83 : 001A 94 : 001B 8500 : 001D 95 : 001E CC1F51 : 0021 CD1F50 : 0024 1B60 : : : : : : : : | bcta,un start ; reset vector retc,un ; interrupt vector start: ppsu intinhibit ;inhibit interrupts loop: ppsl withcarry cpsl carry loda,r0 lsbA ; get the score loda,r1 msbA loda,r3 inc ; get the increment addi,r0 H'66' addi,r1 H'66' cpsl H'01' ; clear carry addz r3 ; perform BCD addition, scoreX = scoreX + r3 dar,r0 addi,r1 H'00' dar,r1 stra,r0 lsbA ; save result stra,r1 msbA bctr,un loop msbA equ $1F50 lsbA equ $1F51 inc equ $1F52 carry equ $01 withcarry equ $08 intinhibit equ $20 |

### References

* Signetics 2650 Microprocessor Applications Memo — Fixed Point Decimal Arithmetic Routines
# Signetics 2650 & 2636 programming/Bibliography
### Datasheets

* Signetics 2650 Microprocessor. Hardware Specifications - Assembler Language - Software Simulator - Appendixes.
* Phillips 2650 Series Datasheet.
* Signetics 2650 User Manual.
* Signetics 2650 Overview.
* Signetics Programmable Video Interface 2636.

### Commentary on 2650

* An introduction to microcomputers, vol 2, chap 11, The Signetics 2650A. Adam Osborne.
* Signetics 2650: An IBM on a Chip, The CPUshack museum.

### Other resources

* Emerson Arcadia 2001 Central, supporting all Signetics 2650-based machines, (Interton VC 4000, Elektor TV Games Computer, et al.)
* Work on the Central Data board