OpenLLM-France/wikimedia huggingface dataset:
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6
## 2...Nc6 - King's Knight Opening

2...Nc6 is the natural move, combining defence of the pawn with control of the d4 square and avoiding committing another pawn for now.

### White's responses

White has multiple choices here which can lead to very different games.
* 3. Bb5 is the most played. White puts pressure on the knight defending the pawn.
* 3. Bc4 is quieter. Instead of attacking the knight, White chooses to target the weak f7 pawn.
* 3. d4 is aggressive. Subsequent play may result in a very open game.
* 3. Nc3 is the quietest common continuation.
* 3. c3, the Ponziani opening, opens the white diagonal for the queen, allows for an eventual d4 pawn push, and controls d4 and b4 (possible plants by the black knight) at the expense of hemming in the knight.
Some more uncommon moves:
* 3. Nxe5, the Irish Gambit, sacrificing a knight for a pawn.
* 3. g3, the rarely seen Konstantinopolsky Opening
* 3. Be2, a passive reply called the Inverted Hungarian Opening or Tayler Opening.
* 3. b4, a very rarely seen gambit called the Pachman Wing.
* 3. c4!?, Dresden Opening, not allowing d5 and after Nf6 transpose to Nimzowitch variation Nc3!, is not bad

## Statistics
### Estimated next move popularity

    Bb5 48%, Bc4 26%, d4 14%, Nc3 9%, c3 1%. All other moves less than 1%.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 e5 2. Nf3 Nc6
| | 3 | 4 | 5 |
| Ruy Lopez | Bb5 a6 | Ba4 Nf6 | O-O Be7 | = |
| Italian Game | Bc4 Bc5 | c3 Nf6 | d4 exd4 | = |
| Scotch Game | d4 exd4 | Nxd4 Bc5 | Nb3 Bb4+ | = |
| Four Knights Game | Nc3 Nf6 | d4 exd4 | Nxd4 Bb4 | = |
| Ponziani Opening | c3 d5 | Bb5 dxe4 | Nxe5 Qg5 | = |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Nunn's Chess Openings. 1999. John Nunn (Editor), Graham Burgess, John Emms, Joe Gallagher. ISBN 1-8574-4221-0.
* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Ruy Lopez:Open Game
## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 e5 2. Nf3 Nc6 3. Bb5 Bc5 4. c3
| 2 |
| ... Nge7 | = |
| ... f5 | = |
| ... Nf6 | = |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* This Chess related article is a stub. Please assist Wikibooks by expanding it.
# Ruy Lopez:Open Game
## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. . 1. e4 e5 2. Nf3 Nc6 3. Bb5 Bc5 4. c3 f5
| 3 |
| 5. exf5 - | = |
| 5. d4 - | = |
| 5. Bxc6 - | = |
| 5. Nxe5 - | = |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* This Chess related article is a stub. Please assist Wikibooks by expanding it.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bb5/3...Nd4/4. Bc4
## 4. Bc4

White retreated the attacked bishop, who is now targeting f7. Common moves in this position are 4...Nxf3+ and 4...Bc5.
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Bc5/3. Nxe5/3...f6
## 3...f6?

This move, seemingly attacking the knight, allows White to win with 4. Qh5+! because it allows 4...g6 5. Nxg6! hxg6 6. Qxh8 when White is up material. Other legal moves instead of 4...g6 would lead to checkmate:
* 4...Ke7?? leads to:
* 4...Kf8?? simply leads to a checkmate in one, with 5. Qf7#.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bb5/3...Nd4
## Ruy Lopez - Bird's Defence

Black gives up the defense of e5 and instead counter-attacks with a threat towards the bishop. The drawback is that after the knight exchange on d4 Black will have a slightly inferior pawn structure, though with a slight space gain.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
    1.e4 e5 2.Nf3 Nc6 3.Bb5 Nd4
| | 4 | 5 | 6 | 7 |
| Bird's Defence | Nxd4 exd4 | O-O Bc5 | d3 c6 | Ba4 Ne7 | += |
| Bird's Defence | Bc4 | | |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# 3...Bb4!? - Alapin Defence
### 3...Bb4!?

3...Bb4!? is a very odd response to the Ruy Lopez, named the Alapin Defence. This move copies White's move 3. Bb5 and has no clear idea. Everything that it attacks is defended, and white has two major options against this dubious defence:
* 4. Bxc6 attempts to ruin Black's pawn structure by forcing them to double their pawns with either 4...bxc6 or 4...dxc6.
* 4. c3 ignores the idea to double pawns and attacks the Bb4, and prepares to play d4 and rip the center open.
Therefore, the Alapin Defence is a very dubious defence against the Ruy Lopez, and should not be played without proper planning.
1. e4 e5 2. Nf3 Nc6 3. Bb5 Bb4!?
# Circuit Theory/Impedance

The impedance concept has to be formally introduced in order to solve node and mesh problems.

## Symbols & Definition

Impedance is a concept within the phasor domain / complex frequency domain.
Impedance is not a phasor although it is a complex number.
Impedance = Resistance + Reactance:
    $Z=R+X$
    Impedance = $Z$
    Resistance = $R$
    Reactance = $X$

## Reactance

Reactance comes from either inductors or capacitors:
    $X_{L}$
    $X_{C}$
Reactance comes from solving the terminal relations in the phasor domain/complex frequency domain as ratios of V/I:
    ${\frac {V}{I}}=R$
    ${\frac {V}{I}}=X_{L}=j\omega L$ or $X_{L}=sL$
    ${\frac {V}{I}}=X_{C}={\frac {1}{j\omega C}}$ or $X_{C}={\frac {1}{sC}}$
Because of Euler's equation and the assumption of exponential or sinusoidal driving functions, the operator ${\frac {d}{dt}}$ can be decoupled from the voltage and current and re-attached to the inductance or capacitance. At this point the inductive reactance and the capacitive reactance are conceptually imaginary resistance (not a phasor).
Reactance is measured in ohms like resistance.

## Characteristics

Impedance has magnitude and angle like a phasor and is measured in ohms.
Impedance only exists in the phasor or complex frequency domain.
Impedance's angle indicates whether the inductor or capacitor is dominating. A positive angle means that inductive reactance is dominating. A negative angle means that capacitive reactance is dominating. An angle of zero means that the impedance is purely resistive.
Impedance has no meaning in the time domain.
# Circuit Theory/Introduction to Filtering

Filter is a circuit constructed from Resistor and Capacitor or Inductor in order to pass certain range of frequencies . The range of frequencies that make the circuit stable
Let examine the following circuits

## RC Circuit

A circuit with one resistor in series with the input and one capacitor parallel to the load
    $V_{o}=V_{i}{\frac {\frac {1}{j\omega C}}{R+{\frac {1}{j\omega C}}}}$
    ω = 0$\omega ={\frac {R}{L}}$ω = Infinity $V_{o}=V_{i}$$V_{o}=V_{i}$$V_{o}=0$
The RC circuit is more stable at frequencies from zero up to the response frequency :${\frac {1}{RC}}$ . This circuit is ideal for Low Pass Frequency Filter .

## CR Circuit

A circuit with one capacitor in series with the input and one resistor parallel to the load
    $V_{o}=V_{i}{\frac {R}{R+{\frac {1}{j\omega C}}}}$
    ω = 0ω = ${\frac {R}{L}}$ω = Infinity $V_{o}=0$$V_{o}=V_{i}$$V_{o}=V_{i}$
The CR circuit is more stable at frequencies from the response frequency ${\frac {1}{RC}}$ up to infinity. This circuit is ideal for High Pass Frequency Filter .

## RL Circuit

A circuit with one resistor in serires with the input and one inductor parallel to the load
    $V_{o}=V_{i}{\frac {j\omega L}{R+j\omega L}}$
    ω = 0$\omega ={\frac {R}{L}}$ω = Infinity $V_{o}=0$$V_{o}=V_{i}$$V_{o}=V_{i}$
The RL circuit is more stable at frequencies from the response frequency ${\frac {R}{L}}$ up to infinity. This circuit is ideal for High Pass Frequency Filter .

## LR Circuit

A circuit with one inductor in serires with the input and one resistor parallel to the load
$V_{o}=V_{i}{\frac {R}{R+j\omega L}}$
| ω = 0 | $\omega ={\frac {R}{L}}$ | ω = Infinity |
| $V_{o}=V_{i}$ | $V_{o}=V_{i}$ | $V_{o}=0$ |
The LR circuit is more stable at frequencies from zero up to the response frequency ${\frac {R}{L}}$ . This circuit is ideal for Low Pass Frequency Filter .
In Conclusion, Resistor and Capacitor or Inductor can be used for constructing a Filter
* For Low Pass Filter use LR or RC
* For High Pass Filter use RL or CR

## Conclusion

| Filter Types | High Pass Filter | Low Pass Filter | Low Pass Filter | High Pass Filter |
| Circuit | RL | LR | RC | CR |
| ω$_ο$ | ${\frac {R}{L}}$ | ${\frac {R}{L}}$ | ${\frac {1}{RC}}$ | ${\frac {1}{RC}}$ |
| T | ${\frac {L}{R}}$ | ${\frac {L}{R}}$ | CR | CR |
| Z | $R+j\omega L$ | $R+j\omega L$ | $R+{\frac {1}{j\omega C}}$ | $R+{\frac {1}{j\omega C}}$ |
| ${\frac {V_{o}}{V_{i}}}$ | ${\frac {j\omega L}{R+j\omega L}}$ | ${\frac {R}{R+j\omega L}}$ | ${\frac {\frac {1}{j\omega C}}{R+{\frac {1}{j\omega C}}}}$ | ${\frac {j\omega CR}{1+j\omega CR}}$ |
| Frequency Response | ω = 0 V$_o$ = 0 ω = ω$_ο$ V$_o$ = V$_i$ ω = 0 V$_o$ = V$_i$ | ω = 0 V$_o$ = V$_i$ω = ω$_ο$ V$_o$ = V$_i$ ω = 0 V$_o$ = 0 | ω = 0 V$_o$ = V$_i$ ω = ω$_ο$ V$_o$ = V$_i$ ω = 0 V$_o$ = 0 | ω = 0 V$_o$ = 0 ω = ω$_ο$ V$_o$ = V$_i$ ω = 0 V$_o$ = V$_i$ |
| Stability | Circuit is stable at Frequencies ω = ω$_ο$→Infinity | Circuit is stable at Frequencies ω = 0→ω$_ο$ | Circuit is stable at Frequencies ω = 0→ω$_ο$ | Circuit is stable at Frequencies ω = ω$_ο$→Infinity |
# Circuit Theory/Inductors

An inductor is a coil of wire that stores energy in the form of a magnetic field. The magnetic field depends on current flowing to "store energy."
If the current stops, the magnetic field collapses and creates a spark in the device that is opening the circuit. The large generators found in electricity generation can create huge currents. Turning them off can be dangerous MIT EMF Youtube video. There are no dangers storing them.

### Inductance

Inductance is the capacity of an inductor to store energy in the form of a magnetic field. Inductance is measured by units called "Henries" which is abbreviated with a capital "H," and the variable associated with inductance is "L".
Inductance is the ratio of magnetic flux (symbol $\Phi _{B}$) to current:
$L=\Phi _{B}/i$
$\Phi _{B}$ measures the strength of a magnetic field just like charge measures the strength of an electric field.

### Inductor Terminal Relation

The relationship between inductance, current, and voltage through an inductor is given by the formula:
    $v=L{\frac {di}{dt}}$

### Inductor Safety

Inductors found in power plants can store energy, but inductors found at room temperature will not store energy. An isolated inductor in storage can not kill someone like a capacitor can.
Inductors do cause problems. The first is economic. A good inductor is much more expensive than a capacitor. In some situations, a collection of other components can replace an inductor at less cost. Typical inductors are built with copper which increases in cost as supply on earth dwindles.
Inductors can create spikes and sparks video when turning off that can destroy other electrical components. They can destroy switches. They can vaporize metal.
The biggest inductors at room temperature are found in electric motors. When motors are turned on or off they create what is called a "back EMF." Ideally Back EMF is a voltage spike of infinite voltage. Diodes, capacitors and resistors are used to turn the back EMF into heat on discharge may make starting up the motor a problem. Some electronic speed controlers (ESCs) in UAVs and quadcopters pulse the motor to deliberately and measure the back EMF to figure out what direction the motor is going to spin in. This reduces the need of hall-effect probes and thus reduces the cost of the motor.

### Inductor Example

Question: Given the current through a 10mH inductor is $i(t)=5t*e^{-1000t}$ amps, what is the voltage?
Solution: No need to know the initial conditions because the solution is a derivative: $v(t)=Ldi/dt$.
Using Wolfram Alpha, the solution is $v(t)=.01*e^{-1000t}(5-5000t)$ volts.
# Circuit Theory/First Order Circuits
## First Order Circuits

First order circuits are circuits that contain only one energy storage element (capacitor or inductor), and that can, therefore, be described using only a first order differential equation. The two possible types of first-order circuits are:
* RC (resistor and capacitor)
* RL (resistor and inductor)
RL and RC circuits is a term we will be using to describe a circuit that has either a) resistors and inductors (RL), or b) resistors and capacitors (RC).

## RL Circuits

An RL Circuit has at least one resistor (R) and one inductor (L). These can be arranged in parallel, or in series. Inductors are best solved by considering the current flowing through the inductor. Therefore, we will combine the resistive element and the source into a Norton Source Circuit. The Inductor then, will be the external load to the circuit. We remember the equation for the inductor:
    $v(t)=L{\frac {di}{dt}}$
If we apply KCL on the node that forms the positive terminal of the voltage source, we can solve to get the following differential equation:
    $i_{source}(t)={\frac {L}{R_{n}}}{\frac {di_{inductor}(t)}{dt}}+i_{inductor}(t)$
We will show how to solve differential equations in a later chapter.

## RC Circuits

An RC circuit is a circuit that has both a resistor (R) and a capacitor (C). Like the RL Circuit, we will combine the resistor and the source on one side of the circuit, and combine them into a thevenin source. Then if we apply KVL around the resulting loop, we get the following equation:
    $v_{source}=RC{\frac {dv_{capacitor}(t)}{dt}}+v_{capacitor}(t)$

## First Order Solution
### Series RL

The differential equation of the series RL circuit
    $L{\frac {dI}{dt}}+IR=0$
    ${\frac {dI}{dt}}=-I{\frac {R}{L}}$
    ${\frac {1}{I}}dI=-{\frac {R}{L}}dt$
    $\int {\frac {1}{I}}dI=-{\frac {R}{L}}\int dt$
    $lnI=-{\frac {R}{L}}t+C$
    $I=e^{-{\frac {R}{L}}t+C}$
    $I=Ae^{-{\frac {R}{L}}t}\quad A=e^{C}$
| t | I(t) |
| 1 ${\frac {R}{L}}$ | 36% A |
| 2 ${\frac {R}{L}}$ | 14% A |
| 3 ${\frac {R}{L}}$ | 5% A |
| 4 ${\frac {R}{L}}$ | 2% A |
| 5 ${\frac {R}{L}}$ | 0.7% A |

### Series RC

The differential equation of the series RC circuit
    $C{\frac {dV}{dt}}+{\frac {V}{R}}=0$
    ${\frac {dV}{dt}}=-V{\frac {1}{RC}}$
    ${\frac {1}{V}}dV=-{\frac {1}{RC}}dt$
    $\int {\frac {1}{V}}dV=-{\frac {1}{RC}}\int dt$
    $lnV=-{\frac {1}{RC}}t+C$
    $V=e^{-{\frac {1}{RC}}t+C}$
    $V=Ae^{-{\frac {1}{RC}}t}\quad A=e^{C}$
| t | V(t) |
| 1 ${\frac {1}{RC}}$ | 36% V |
| 2 ${\frac {1}{RC}}$ | 14% V |
| 3 ${\frac {1}{RC}}$ | 5% V |
| 4 ${\frac {1}{RC}}$ | 2% V |
| 5 ${\frac {1}{RC}}$ | 0.7% V |

### Time Constant

The series RL and RC has a Time Constant
    $T={\frac {L}{R}}$
    $T={\frac {RC}{1}}$
In general, from an engineering standpoint, we say that the system is at steady state ( Voltage or Current is almost at Ground Level ) after a time period of five Time Constants.
# Circuit Theory/IV curves

These curves reflect that most circuits are designed with voltage as the independent variable; with voltage sources and currents being dependent variables. What this means is that the slopes of the IV curves are 1/R. So normally whereas normally horizontal is a slope of 0, it is now a slope of infinity.
Ideally, a diode would turn on at 0 volts and go from horizontal to vertical instantly.
Ideally, a voltage source would be a vertical line.
Ideally, resistance does not change due to voltage or current and are thus straight lines.
A transistor is understood through the above type of graph. The horizontal lines represent current source behavior. Notice how the current stays constant while the voltage changes.
The angled straight lines coming out of the origin represent "linear" behavior where the transistor is operating like an amplifier. The horizontal lines are where the "linear" behavior stops and the current source behavior begins.
Understanding what is controlling this and why the many blue lines starts with understanding what the three wires into a transmitter do:
* S = source (of power .. connect to a voltage source)
* G = gate (like the switch of a light switch .. more like a dimmer knob)
* D = drain (current leaves .. connected to ground)
* B = Body ... (often connected to the source)
Think of S and D as the wires going into a light switch and G as the dimmer knob. Each blue line represents a position of the dimmer switch. The gate or dimmer switch determines the amount of amplification and the value of the current source behavior.
So what are the dependent and independent variables above? There are two independent variables: gate V$_g$ and source voltage V$_s$. Right now it is not important to understand how V$_g$ is physically measured. The important question is "What is the nature of the current source behavior? It seems to be dependent on two things." An ideal, independent current source manipulates the voltage to keep the current constant. The current source behavior above is dependent upon the Gate.
The symbols for a transistor are:
# Circuit Theory/Filters

Some terms used to describe and classify linear filters:

## Frequency Response

** Low-pass filter – low frequencies are passed, high frequencies are attenuated.
** High-pass filter – high frequencies are passed, low frequencies are attenuated.
** Band-pass filter – only frequencies in a frequency band are passed.
** Band-stop filter or band-reject filter – only frequencies in a frequency band are attenuated.
** Notch filter – rejects just one specific frequency - an extreme band-stop filter.
** Comb filter – has multiple regularly spaced narrow passbands giving the bandform the appearance of a comb.
** All-pass filter – all frequencies are passed, but the phase of the output is modified.
* Cutoff frequency is the frequency beyond which the filter will not pass signals. It is usually measured at a specific attenuation such as 3dB.
* Roll-off is the rate at which attenuation increases beyond the cut-off frequency.
* Transition band, the (usually narrow) band of frequencies between a passband and stopband.
* Ripple is the variation of the filter's insertion loss in the passband.
* The order of a filter is the degree of the approximating polynomial and in passive filters corresponds to the number of elements required to build it. Increasing order increases roll-off and brings the filter closer to the ideal response.
# Circuit Theory/Frequency Response

If
    The Output Voltage is V$_o$
    The Input Voltage is V$_i$
    ω = 2πf
    The Impedance of Resistor : Z$_R$ = R
    The Impedance of Capacitor : Z$_C$ = R$_C$ + 1 / jωC
    The Impedance of Inductor : Z$_L$ = R$_L$ + jωL
    The Respond Frequency is the Frequency when Capacitor or Inductor starts to React or conduct current : ω$_o$
    ω : 0 → ω$_o$ : Low Frequency Range
    ω : ω$_o$ → Infinity : High Frequency Range

## Resistor

The Voltage or Current of the resistor does not change with frequency or time only the magnitude change
$V_{o}=V_{i}-I*Z_{R}=V_{i}-I*R$

## Capacitor

The Voltage of the Capacitor lags the applied Voltage one angle of 90°
The Capacitor has a respond frequency equal to 1 / RC (The frequency when Capacitor starts to react i.e. starts to conduct ). And the time it takes to reach this frequency equals RC
The Voltage or Current of the Capacitor will change with frequency or time
$V_{o}=V_{i}-I*Z_{C}$ = V$_i$ - I * [R$_C$ + 1 / jωC]
| ω = 0 | ω = 0 → 1 / RC | ω = 1 / RC | ω = 1 / RC → | ω = infinity |
| $V_{o}=0$ | O | $V_{o}=V_{i}$ | Mo | $V_{o}=V_{i}$ |
The circuit of the Capacitor is more stable at high frequency . Frequencies from the response frequency 1 / RC to infinity

## Inductor

The Voltage of the Inductor lead the applied Voltage one angle of 90°
The Inductor has a respond frequency equal to R / L . And the time it takes to reach this frequency equals L / R
The Voltage or Current of the Inductor will change with frequency or time
$V_{o}=V_{i}-I*Z_{L}$ = V$_i$ - I * [R$_L$ - jωL]
| ω = 0 | ω = 0 → 1 / RC | ω = 1 / RC | ω = 1 / RC → | ω = infinity |
| $V_{o}=V_{i}$ | $V_{o}=V_{i}$ | $V_{o}=V_{i}$ | $V_{o}<V_{i}$ | $V_{o}=0$ |
The circuit of the Inductor is more stable at low frequency (The Voltage of the Inductor Does change with Frequency). Frequencies from zero up to the response frequency R / L
With the right connection of the Resistor and Capacitor or Inductor the circuit can be used as a Low Pass Filter or High Pass Filter
# Blender 3D: Noob to Pro/Advanced Tutorials/Python Scripting/Import scripts

| previous module: "Export scripts" | • Table of Contents • Glossary | next module: "Scripts for modifying meshes" |
Importing objects into Blender is not that different from exporting. However, there are a few additional things to take care of. Firstly, all references to "export" in the header should be changed to "import". Secondly, instead of simply writing out data that Blender provides to us, we are responsible for giving data to Blender and ensuring that it is properly formatted. Although Blender is flexible, allowing us to ignore things like vertex indices, we do need to be careful that we do things in a sensible order.
Additionally, there is a bit of housekeeping to deal with. We should be in edit mode while modifying the mesh data. We also need to link up our newly created data to the scene, after it has been properly constructed, so that Blender can see it and maintain it. This makes it visible to the user, as well as ensuring that it gets saved along with the scene.

## Importing a Mesh

Here is a simple script that can import an OBJ file created by the export script.
This will load an OBJ file into Blender, creating a new mesh object. Let's take a look at the more interesting portions.
Turn on the wait cursor so the user knows the computer is importing.
Here, we create a new mesh datablock. The name is made from the path only with the filename.
Next, we create a new object and link it to the mesh. This instantiates the mesh.
Finally, we attach the new object to the current scene, making it accessible to the user and ensuring that it will be saved along with the scene. We also select the new object so that the user can easily modify it after import. Copying the scenes layers ensures that the object will occupy the scenes current view layers.
Now the finishing touches. We turn off the wait cursor. We also redraw the 3D window to ensure that the new object is initially visible. If we didn't do this, the object might not appear until the user changes the viewpoint or forces a redraw in some other way.
| previous module: "Export scripts" | • Table of Contents • Glossary | next module: "Scripts for modifying meshes" |
# Blender 3D: Noob to Pro/Advanced Tutorials/Python Scripting/Scripts for modifying meshes

| previous module: "Import scripts" | • Table of Contents • Glossary | next module: "Advanced Modeling" |
(To be written.)
See saltshaker a basic but functional Python script for Blender. The page includes details of how it was made.
http://jmsoler.free.fr/didacticiel/blender/tutor/python_script01_en.htm is a good website for learning about mesh creation.
| previous module: "Import scripts" | • Table of Contents • Glossary | next module: "Advanced Modeling" |