OpenLLM-France/wikimedia huggingface dataset:
# A-level Mathematics/OCR/M4

This is the Mechanics 4 module of the A-level Mathematics book. This module assumes that you are familiar with the C1, C2, C3, C4, M1, M2 and M3 modules. Please post all questions to A-level Mathematics/Discussion.

## Contents

* /Relative Motion
* Centre of Mass (Second Level)
* Moment of Inertia
* Rotation of a Rigid Body
* Simple Harmonic Motion (Second Level)

## Formulae

By the end of this module you will be expected to have learnt the following formulae:

### Relative Velocity

* $_{P}\!V_{Q}+_{Q}\!V_{R}=_{P}\!V_{R}$

### Angular Motion

For constant angular acceleration:
   * $\omega _{1}=\omega _{0}+\alpha t\,$
   * $\theta =\omega _{0}t+{\frac {1}{2}}\alpha t^{2}$
   * $\theta ={\frac {1}{2}}(\omega _{0}+\omega _{1})t$
   * $\omega _{1}^{2}=\omega _{0}^{2}+2\alpha \theta$
   * $\theta =\omega _{1}t-{\frac {1}{2}}\alpha t^{2}$
* Angular momentum: $I\omega \,$
* Kinetic energy: ${\frac {1}{2}}I\omega ^{2}$
* Equation of motion: $C=I{\ddot {\theta }}$
* Work done by a constant couple: $W=C\theta \,$
# A-level Mathematics/OCR/M4/Rotation of a Rigid Body

In M1 you learnt the five formulae for motion with constant linear acceleration:
   * $v=u+at\,$
   * $s=ut+{\frac {1}{2}}at^{2}$
   * $s={\frac {1}{2}}(u+v)t$
   * $v^{2}=u^{2}+2as\,$
   * $s=vt-{\frac {1}{2}}at^{2}$
We can consider motion with constant angular acceleration in the same way:
   * $\omega _{1}=\omega _{0}+\alpha t\,$
   * $\theta =\omega _{0}t+{\frac {1}{2}}\alpha t^{2}$
   * $\theta ={\frac {1}{2}}(\omega _{0}+\omega _{1})t$
   * $\omega _{1}^{2}=\omega _{0}^{2}+2\alpha \theta$
   * $\theta =\omega _{1}t-{\frac {1}{2}}\alpha t^{2}$
While the first set of formulae cover the displacement, velocity and acceleration in terms of straight-line distance, the second set cover the same quantities but for rotating objects.
# A-level Mathematics/OCR/S1
## What is statistics?

Statistics is the scientific approach to numerical information. Statistical development has shown that many aspects of progress depend upon the correct analysis of numerical information - particularly in science, economics and business. Please post all questions to A-level Mathematics/Discussion.

## Contents

* Collection of data (February 18, 2006)
* Representation of data (February 18, 2006)
* Probability
* Discrete Random Variables
* Bivariate Data

## Bibliography

Harper "Statistics" M&E Handbooks, 1981. www.samer.com.
Langley "Practical Statistics simply explained", Pan, 1979
Larson "Introduction to probability theory and statistical inference, 2nd edition" Wiley International 1974
Oxford Cambridge and RSA Examinations - Syllabus
# Annotations to James Joyce's Ulysses/Circe/522
## Annotations

Dona nobis pacem (Latin) Grant us peace. This is the concluding phrase of the Agnus Dei (Lamb of God), which is sung in the Latin Tridentine Mass during the Communion Rite. Lynch is completing Stephen's parody two lines before.

## References

* ↑ Gifford (1988) 511. Thornton (1968) 410.
# Alcor6L/eLua/pack

This module allows for arbitrary packing of data into Lua strings and unpacking data from Lua strings. In this way, a string can be used to store data in a platform-indepdendent manner. It is based on the lpack module from Luiz Henrique de Figueiredo (with some minor tweaks).
Both methods of this module (pack and unpack) use a format string to describe how to pack/unpack the data. The format string contains one or more data specifiers, each data specifier is applied to a single variable that must be packed/unpacked. The data specifier has the following general format:
where:

# Functions
## pack.pack

Packs variables in a string.
* format - format specifier (as described here).
* val1 - first variable to pack.
* val2 - second variable to pack.
* valn - nth variable to pack.
Returns:
* packed - a string containing the packed representation of all variables according to the format.

## pack.unpack

Unpacks a string
* string - the string to unpack.
* format - format specifier (as described here).
* init - (optional) marks where in string the unpacking should start (1 if not specified).
Returns:
* nextpos - the position in the string after unpacking.
* val1 - the first unpacked value.
* val2 - the second unpacked value.
* valn - the nth unpacked value.
# Alcor6L/eLua/elua

This module is an interface to the core system and services of eLua. Some functions from this module can change the runtime behaviour of eLua, which in turn can lead to instability or unexpected program behaviour. Use this module with care.

# Functions
## elua.egc_setup

Change the emergency garbage collector operation mode and memory limit (see here for details).
* mode - the EGC operation mode. Can be either elua.EGC_NOT_ACTIVE, elua.EGC_ON_ALLOC_FAILURE, elua.EGC_ON_MEM_LIMIT, elua.EGC_ALWAYS or a combination between the last 3 modes in this list (they can be combined both with bitwise OR operations, using the bit module, or simply by adding them).
* memlimit - required only when elua.EGC_ON_MEM_LIMIT is specified in mode, specifies the EGC upper memory limit.
Returns: nothing.

## elua.save_history

Save the interpreter line history. Only available if linenoise is enabled, check here for details.
* filename - the name of the file where the history will be saved. CAUTION: the file will be overwritten.
Returns: nothing.

## elua.version

Returns the current eLua version as a string
Arguments: none.
Returns: the eLua version currently running.
# Alcor6L/eLua/i2c

This module contains functions for accessing the I2C interfaces of the eLua CPU.
Only master I2C mode is implemented in eLua.

# Functions
## i2c.setup

Setup the I2C interface.
speed = i2c.setup( id, speed )
* id - the ID of the I2C interface.
* speed - the clock frequency of the I2C interface. It can be i2c.FAST (400KHz), i2c.SLOW (100KHz) or a number giving the required I2C bus clock speed in Hz.
Returns:
* speed - the actual speed of the I2C interface.

## i2c.start

Send a START on the specified I2C interface.
* id - the ID of the I2C interface.
Returns: nothing.

## i2c.stop

Send a STOP on the specified I2C interface.
* id - the ID of the I2C interface.
Returns: nothing.

## i2c.address

Send an address on the I2C interface.
* id - the ID of the I2C interface.
* address - the address.
* direction - i2c.TRANSMITTER if the master wants to send data, or i2c.RECEIVER if the master wants to receive data.
Returns:
* acked - true if the address was acknowledged by an I2C slave, false otherwise.

## i2c.write

Writes data to a slave that has already acknowledged an i2c.address call.
* id - the ID of the I2C interface.
* data1 - the data to send. It can be either a number between 0 and 255, a string or a table (array) of numbers.
* data2 (optional) - the second data to send.
* datan (optional) - the n-th data to send.
Returns:
* wrote - the number of bytes actually written.

## i2c.read

Reads a number of bytes from a slave that has already acknowledged an i2c.address call. It acknowledges all the bytes received except for the last one.
* id - the ID of the I2C interface.
* numbytes - the number of bytes to read.
Returns:
* data - a string with all the data read from the I2C interface.
# Alcor6L/eLua/can

This module contains functions for accessing the CAN interfaces of the eLua CPU
Two types of CAN identifier numbers are used:
* can.ID_STD: Standard CAN identifiers are 11 bits in length
* can.ID_EXT: Extended identifiers are 29 bits.

# Functions
## can.setup

Setup the CAN interface
* id - the ID of the CAN interface
* clock - the clock of the CAN interface.
Returns:
* clock - The actual clock set on the CAN interface. Depending on the hardware, this might have a different value than the clock parameter.

## can.send

Send message over the CAN bus.
* id - the ID of the CAN interface.
* canid - CAN identifier number.
* canidtype - identifier type: can.ID_STD or can.ID_EXT
* message - message in string format, 8 or fewer bytes.
Returns: nothing.

## can.recv

Receive CAN bus message.
* id - the ID of the CAN interface.
Returns:
* canid - CAN identifier number.
* canidtype - identifier type: can.ID_STD or can.ID_EXT
* message - message in string format, 8 or fewer bytes.
# Alcor6L/eLua/cpu

This module deals with low-level access to CPU (and related modules) functionality, such as reading and writing memory, or enabling and disabling interrupts. It also offers access to platform specific CPU-related constants.

# Functions
## cpu.w32

Writes a 32-bit word to memory.
* address - the memory address.
* data - the 32-bit data to write.
Returns: nothing.

## cpu.r32

Read a 32-bit word from memory.
* address - the memory address.
Returns:
* data - the 32-bit word read from memory.

## cpu.w16

Writes a 16-bit word to memory.
* address - the memory address.
* data - the 16-bit data to write.
Returns: nothing.

## cpu.r16

Reads a 16-bit word from memory.
* address - the memory address.
Returns:
* data - the 16-bit word read from memory.

## cpu.w8

Writes a byte to memory.
* address - the memory address.
* data - the byte to write.
Returns: nothing.

## cpu.r8

Reads a byte from memory.
* address - the memory address
Returns:
* data - the byte read from memory.

## cpu.cli

Disables the global CPU interrupt flag if called without arguments, or a specific interrupt for a list of resource IDs if called with arguments.
* id - the interrupt ID. If specified, at least one resource ID must also be specified.
* resnum1 - the first resource ID, required if id is specified.
* resnum2 (optional) - the second resource ID.
* resnumn (optional) - the #n#-th resource ID.
Returns: nothing.

## cpu.sei

Enables the global CPU interrupt flag if called without arguments, or a specific interrupt for a list of resource IDs if called with arguments.
* id - the interrupt ID. If specified, at least one resource ID must also be specified.
* resnum1 - the first resource ID, required if id is specified.
* resnum2 (optional) - the second resource ID.
* resnumn (optional) - the #n#-th resource ID.
Returns: nothing.

## cpu.clock

Get the CPU core frequency.
Arguments: none.
Returns:
* clock - the CPU clock (in Hertz).

## cpu.set_int_handler

Sets the Lua interrupt handler for interrupt *id* to function *handler*. *handler* can be #nil# to disable the interrupt handler. Only available if interrupt support is enabled, check here for details.
* id - the interrupt ID.
* handler - the Lua interrupt handler function, or *nil* to disable the Lua interrupt handler feature.
Returns:
* prev_handler - the previous interrupt handler for interrupt *id*, or *nil* if an interrupt handler was not set for interrupt *id*.

## cpu.get_int_handler

Returns the Lua interrupt handler for interrupt *id*
* id - the interrup ID.
Returns: handler - the interrupt handler for interrupt *id*, or *nil* if an interrupt handler is not set for interrupt *id*.

## cpu.get_int_flag

Get the interrupt pending flag of an interrupt ID/resource ID combination, and optionally clear the pending flag. Only available if interrupt support is enabled, check here for details.
* id - the interrupt ID.
* resnum - the resource ID.
* clear (optional) - true to clear the interrupt pending flag or false to leave the interrupt pending flag untouched. Defaults to true if not specified.
Returns: nothing.
# Alcor6L/eLua/pd

This module contains functions that access specific platform data. Useful if the code needs to know on which platform it runs.

# Functions
## pd.platform

Get platform name.
Returns:
* platform - the name of the platform on which eLua is running.

## pd.cpu

Get CPU name.
Returns:
* cpu - the name of the CPU of the platform on which eLua is running.

## pd.board

Get board name.
Returns:
* board - the name of the board on which eLua is running.
# Alcor6L/eLua/mizar32.rtc

This module contains functions to drive the Real-Time Clock present on the Mizar32's ethernet module.
The functions accept and return the time and date as a table in the same format at Lua's os.date and os.time functions, with fields year (1900–2099), month (1-12), day (1-31), wday (1-7), hour (0-23), min (0-59) and sec (0-59). For wday, the day of the week, by convention, 1 is Sunday.

# Functions
## mizar32.rtc.set

Sets the time and/or date into the RTC hardware.
* datetime - A table with the time and/or date fields to set. Any fields which are not present (or are nil) are not changed, so you can set the time, the date or individual fields separately. Setting nonexistent dates like the 31st of February is possible but what will happen next is unpredictable.

## mizar32.rtc.get

Reads the current date and time from the RTC hardware.
Returns:
* datetime - A table with fields year, month, day, wday, hour, min and sec.
# A Guide to Super Mario Bros. 2/World 6-1

Only two more Worlds remain in your adventure. World 6-1 looks a lot like the World of Deserts in World 2, but you'll run into more enemies and quicksand here. You'll have to look hard to find the key in map B.

## Balanced character selection

Since we're back to a desert like world, it's only natural that we pick the character who works best in the desert. Trot Toad on out for one last tour of the World of Dreams. His fifth and final appearance might be short, but it will be memorable, and you will be grateful for his fast digging skills later on.

## Map A
### Part 1

File:SMB2 World6-1 mapA1.png
Careful on the quicksand. If you pause when crossing the quicksand, you might start to sink. You can jump repeatedly to pull yourself out of the quicksand. If you don't respond quickly, you'll lose a life.
(1) Sub-space 1. First defeat Cobrat, then go inside the jar. As soon as you pull out the clump of grass and find the Potion, make a door to Sub-space on the bone to the right. The second that the Mushroom appears on the quicksand, grab it before it sinks beneath the surface!

### Part 2

File:SMB2 World6-1 mapA2.png
(2) Shells in jars. You will see two jars sitting side by side. But after you defeat Cobrat and go in, all you'll find is a Turtle Shell, which isn't too effective a weapon on this stage…
(3) Sub-space 2. Take the potion to the top of the hill between the two cactus plants and you'll get a mushroom in Sub-space. But don't get careless—Pokey and Panser will try to stop you. And they mean double trouble.
Pokey to the rescue: in Super Mario Advance, the A-coins are stashed pretty high up in the air. Even Luigi will have trouble collecting them unassisted. There's no need to strain yourself. Just hop on top of Pokey for an added boost. And when you're done, take out the bottom segment for a huge amount of points.

## Map B

File:SMB2 World6-1 mapB.png
(4) Where's the Key? Twenty-one jars?! Where's the key to the door? Try the fifth jar from the right. Take care to avoid the Shyguys that infest the vase until you have the Key. Then you can toss the Key at your enemies. A 1-Up is hidden in the third jar from the left.
* Super Mario Advance Mushroom
* File:Super Mario Advance World 6-1.png
* Two patches of grass have been added above the door that leads to the mini-boss. Jump up to them, pull them up, and you'll discover a potion. Carry the potion back to the left and drop it in order to create a door in the middle of the jars. Step inside, and you'll find that useful third hidden mushroom.

## Map C

File:SMB2 World6-1 mapC.png
(5) Fire-breathing Birdo! Birdo shows up again, but in this world she can only blow fire. And she's not so hot at that. Destroy her with three hits from the Mushroom Blocks to the left.
After defeating Birdo, grab the Crystal Ball and head through the hawkmouth gate.
# A Guide to Super Mario Bros. 2/World 6-2

In World 6-2, get on the back of your enemy Albatoss and start on your loooooong night journey. If you fall off, you're done for. But you can move ahead so much easier this way, compared to leaping across waterfalls on Trouters.

## Balanced character selection

Time to go hitchhiking again. This time you'll need to ride on the backs of several Albatosses. The route that leads to helpful items like Mushrooms has a few obstacles in the flight path, so you'll need an excellent jumper for this World. It's time for Luigi to make his last stand.

## Map A

File:SMB2 World6-2 mapA.png
(1) Make it across with a Power Jump. As soon as you enter World 6-2, you may find that the wall before the exit to map B is a little too high for a regular jump. If that's the case, hunker down to charge up energy for a Power Jump, and you'll make it over.

## Map B
### Part 1

File:SMB2 World6-2 mapB1.png
(2) Albatoss airlines. Once you come out, you'll find yourself on the edge of a steep cliff. At your feet here is only one clump of grass. That, and an army of angry Albatosses flying straight for you. Get moving and make a daring leap to land smack on their backs. They will carry you toward the goal.
Don't fly unarmed. It's not a bad idea to pull up a vegetable before you jump on an Albatoss and carry it with you. It might come in handy if you're threatened in midair.

### Part 2

File:SMB2 World6-2 mapB2.png
(3) Sub-space. When you reach the cliff with two clumps of grass, hop off the Albatoss. The potion lies in the patch of grass on the left. Enter Sub-space here and you can get a Mushroom. There's won't be any more Albatosses flying to the right. So when you come out of Sub-space, get on one flying to the left and go back to the start of map B.
(4) Look out—danger ahead! The action at this point in your flight could be tense. You will encounter three Albatosses lined up in a column flying right for you. Jump over them before you collide with them. Luigi can safely make the jump without charging up if you time it just right. For everyone else, it would be a good idea to charge up a Power Jump ahead of time, and be ready to use it when the time is right.
Fly low for A-coins. If you want to grab all of the A-coins, you're going to have to travel along some fairly dangerous routes. Two of the coins in particular are positioned very low in the stage. You'll need to find an Albatoss that's heading back to the left low enough to collect the coins and keep on flying. Of course, you can always just sacrifice one of your lives collecting them if you'd rather just get it over with.

## Map C

File:SMB2 World6-2 mapC.png
(5) Mean old Birdo. The mini-boss of World 6-2 is Birdo again. This nasty character doesn't give up easily. She really goes looking for trouble. Meet her flaming throws with the Mushroom Blocks above and below you. Drop two directly from above. Then throw the other at her from the left. That should take care of her for a while.
After defeating Birdo, grab the Crystal Ball and head through the hawkmouth gate.
# A Guide to Super Mario Bros. 2/Yume Kōjō: Doki Doki Panic

Yume Kōjō: Doki Doki Panic (lit. "Dream Factory: Heart-Pounding Panic") is a 1987 platform game released for the Famicom Disk System exclusively in Japan. It is about a family who plans to rescue two children. "Doki doki" is a Japanese onomatopoeia for a rapidly beating heart, and it is commonly found in Japanese video game titles, carrying connotations of excitement and anxiety. The game is best known for its Western conversion in 1988 as Super Mario Bros. 2, a Nintendo Entertainment System title featuring a cast of Mario characters. It was not until 1992 that this version would be released in Japan, albeit titled Super Mario USA.
Yume Kōjō: Doki Doki Panic was developed in cooperation with Fuji Television to promote its Yume Kōjō '87 (tr. Dream Factory '87) event, which showcased several of Fuji TV's latest TV shows and other products at the time. The game featured the mascots of the Yume Kōjō festival — a family consisting of siblings Imajin and Lina and their parents, Papa and Mama — as its main characters. The rest of the characters, including the main villain, Mamu (named Wart in the Super Mario Bros. 2 release), were all creations by Nintendo for the game. The game takes place within a book with an Arabian setting. All four characters are playable, and the game is not fully completed until the player plays through as all four.
Even though it was not originally conceived as a Mario game, Shigeru Miyamoto had a larger involvement in this game than he did with the original Super Mario Bros. 2 (known outside Japan as Super Mario Bros.: The Lost Levels) which was released in Japan. Some elements from the Mario universe already existed in Doki Doki Panic, such as the Starman, Coin, jumping sound effects, the POW Blocks, and level warping. The game's soundtrack was already composed by Kōji Kondō, the composer for the first Super Mario Bros. game.
For Super Mario Bros. 2, the Yume Kōjō family members were replaced with Mario, Luigi, Princess Toadstool, and Toad, and the Arabian elements were removed. Numerous other small changes were made, such as the B Button on the NES controller making the characters run. A full list of differences can be found on the Changes page. Several elements in Yume Kōjō: Doki Doki Panic would later become staples of the Mario franchise, such as the characters Birdo and Shy Guy.
# A-level Computing 2009/AQA/Computer Components, The Stored Program Concept and the Internet/Fundamental Hardware Elements of Computers/Boolean algebra

We have met gate logic and combinations of gates. Another way of representing gate logic is through boolean algebra, a way of algebraically representing logic gates. You should have already covered the symbols, below is a quick reminder:
| Bitwise Operator | NOT(${\overline {A}}$) | AND(.) | OR(+) | XOR($\oplus$) | NAND(${\overline {A.B}}$) | NOR(${\overline {A+B}}$) |
| Description | invert input | where exactly two 1s | where one or more 1s | where exactly one 1 | where less than two 1s | where exactly two 0s |
For the exam you might have:
* to convert logic gates into boolean algebra,
* build logic gate combinations from boolean algebra,
* simplify boolean algebra.
# A-level Computing 2009/AQA/Computer Components, The Stored Program Concept and the Internet/Fundamental Hardware Elements of Computers/Boolean gate combinations

Now you have learnt logic gates we will take a look at how they are combined inside hardware. You may well be asked in an exam to draw your own logic gates or to work out what a combination of logic gates will output. In this section we will look at the best way to describe what a set of logic gates is in boolean algebra. Let's take a look at a quick example:
* Exercise: Logic gate combination outputs
* For the following logic gate combinations work out output Q for each:
* Answer:
* Answer:
* Answer:
* This equation can be simplified to equal $A.B$, as $B.B=B$, we'll find out why this is the case in the simplifying boolean equations section coming up
* Answer:
* This equation can be simplified to equal 0 (always false), as ${\overline {A+B}}.A=0$, we'll find out why this is the case in the simplifying boolean equations section coming up
* Answer: