OpenLLM-France/wikimedia huggingface dataset:
# Chemical element

A chemical element is a substance that cannot be changed into any other substance by a normal chemical reaction.
An element is made up of atoms containing electrons, protons and neutrons. Each atom in an element will contain the same number of protons and electrons, for example every carbon atom has six protons and six electrons.
The periodic table of the elements contains lists all of the elements in order of their number of protons and is laid out so that the elements in each group (vertical column) will have similar properties.
Just because two substances contain the same atoms does not always mean that they will have the same properties. Graphite and diamonds are both made completely from carbon atoms, but the way in which they join with each other means that the have different properties.
Atoms of the same element may also contain different numbers of neutrons. Atoms of the same element with different numbers of neutrons are called isotopes.
# Chemicals

The term chemical substance is a precise technical term that is synonymous with chemical for chemists. The word chemical is used in general usage in the English speaking world to refer to both (pure) chemical substances and mixtures (often called compounds), and especially when produced or purified in a laboratory or an industrial process.
Def. Phytochemicals are chemicals of plant origin.
Phytochemicals are chemicals produced by plants through primary or secondary metabolism. They generally have biological activity in the plant host and play a role in plant growth or defense against competitors, pathogens, or predators.

## Resources

* Actinides
* Aluminums
* Argons
* Berylliums
* Borons
* Bromines
* Chlorines
* Fluorines
* Heliums
* Hydrogens
* Iodines
* Kryptons
* Leads
* Lithiums
* Materials
* Mineraloids
* Neons
* Nickels
* Nitrogens
* Oxidanes
* Oxidation numbers
* Oxygens
* Phosphoruses
* Radons
* Reactions
* Rocks as chemicals
* Thoriums
* Xenons

## See Also

* Wikipedia: Chemical substance
# Chemicals/Actinides

The actinide elements are actinium (Ac), thorium (Th), protactinium (Pa), uranium (U), neptunium (Np), plutonium (Pu), americium (Am), curium (Cm), berkelium (Bk), californium (Cf), einsteinium (Es), fermium (Fm), mendelevium (Md), nobelium (No), and lawrencium (Lr). These have been reacted with a number of other elements.

## Thoriums

The diagram at the second down on the right shows the unit cell of thorium diiodide.
The diagram on the left shows the unit cell of β-ThI$_3$.
The third diagram down on the right shows the unit cell of ThI$_4$.

## Protactiniums

Twenty-nine radioisotopes of protactinium have been discovered, the most stable being $^{231}$Pa with a half-life of 32,760 years, $^{233}$Pa with a half-life of 27 days, and $^{230}$Pa with a half-life of 17.4 days; all of the remaining isotopes have half-lives shorter than 1.6 days, and the majority of these have half-lives less than 1.8 seconds; and two nuclear isomers, $^{217m}$Pa (half-life 1.2 milliseconds) and $^{234m}$Pa (half-life 1.17 minutes).
The primary decay mode for isotopes of protactinium lighter than (and including) the most stable isotope $^{231}$Pa (i.e., $^{212}$Pa to $^{231}$Pa) is alpha decay and the primary mode for the heavier isotopes (i.e., $^{232}$Pa to $^{240}$Pa) is beta decay, with primary decay products of isotopes of protactinium lighter than (and including) $^{231}$Pa are actinium isotopes and the primary decay products for the heavier isotopes of protactinium are uranium isotopes.
Protactinium is one of the rarest and most expensive naturally occurring elements, found in the form of two isotopes – $^{231}$Pa and $^{234}$Pa, with the isotope $^{234}$Pa occurring in two different energy states: nearly all natural protactinium is protactinium-231, an alpha emitter formed by the decay of uranium-235, whereas the beta radiating protactinium-234 is produced as a result of uranium-238 decay. Nearly all uranium-238 (99.8%) decays first to the shorter-lived $^{234m}$Pa isomer.
# Chemical Engineering Thermodynamics

Thermodynamics is the science of relationship between heat work and the properties of the system involved.

## Terms to acknowledge

* Process - changes that a system undergoes from one equilibrium state to another
* Cyclic Process - process which returns the system to the initial value at completion
* Isothermal Process - change in system at constant temperature. It is often necessary to exchange heat with surroundings to maintain constant temperature.
* Isobaric Process - change in system at constant pressure
* Isochoric (Isometric) Process - change in system at constant volume
* Adiabatic Process - process in system without heat exchange with surrounding. Q=0

## Thermo variables

1. State variables - macroscopic quantities defining condition of a system such as temperature, pressure, mass
2. Path variables - value of path taken by the system between 2 state such as heat and work
Work (W)
* the energy transferred associated with a force acting through a distance: dW = F. dL
* also called the PdV work when above equation is integrated.
* enable us to find work associated with expansion or compression of a path
[ Sign of convention depends on authors, some uses +W when work is done by system on surroundings and -W when work is done on system by surroundings while others versa-wise; in this chapter, the former is used.]
Heat (Q)
* energy type which is transferred due to a temperature difference
* exchange in system and surroundings which would result in temperature or phase change.
Sign of convention: +Q when heat is added into the system ; -Q when heat is removed from the system
# Complex Analysis/Sample Midterm Exam 1

This exam has a total of 100 points. You have 50 minutes. Partial credit will be awarded so showing your work can only help your grade
Question 1: Restrict $-\pi <\arg(z)\leq \pi$, and take the corresponding branch of the logarithm:
    (a) $\log(1+i{\sqrt {3}})$
    (b) $(1+i)^{1+i}\!$
    (c) $\sin(i\pi )\!$
    (d) $\left|e^{i\pi ^{2}}\right|\!$
Question 2: Compute the following line integrals:
    (a) Let $\gamma (t)=4e^{2\pi it}$ for $t\in [0,1]$. Compute the line integral
       $\oint _{\gamma }{\frac {1}{z^{3}}}\,dz$
    (b) Let $\gamma (t)=t-it$ for $t\in [0,1]$. Compute the line integral
       $\oint _{\gamma }{\bar {z}}z^{2}\,dz$
    (c) Let $\gamma (t)=e^{it}$ for $t\in [0,2\pi ]$. Compute the line integral
       $\oint _{\gamma }e^{z}\cos(z)\,dz$
Question 3: Let $u(x,y)=x^{3}-3xy^{2}-x$, verify that $u(x,y)$ is harmonic and find a function $v(x,y)$ so that $v(0,0)=0$ and $f=u+iv$ is a holomorphic function.
Question 4: Explain why there is no complex number $z$ so that $e^{z}=0$.
Question 5: We often use the formulas from ordinary calculus to compute complex derivatives. This problem is part of the justification. Show that if $f=u+iv$ is holomorphic then ${\frac {\partial f}{\partial z}}=u_{x}+iv_{x}=f_{x}$.
Comment: This problem shows that if $F$ and $f$ is a function in the complex plane, and $F(x+i0)=g(x)$ and $f(x+i0)=g'(x)$, then we can use this problem to show that $\textstyle {\frac {\partial F}{\partial z}}(x+i0)=f(x+i0)$. We will see later that if two holomorphic functions agree on a line then they agree everywhere. So it would have to be the case that $\textstyle {\frac {\partial F}{\partial z}}(z)=f(z)$. (For example, take $F(z)=\sin(z)$ and $f(z)=\cos(z)$ then $g(x)=\sin(x)$, so it must be that $\textstyle {\frac {\partial F}{\partial z}}=f(z)=\cos(z)$.)
Question 6: Decide whether or not the following functions are holomorphic where they are defined.
    (a) $f(z)={\frac {ze^{z}}{z-1}}$
    (b) $f(z)=e^{|z|^{2}}$
    (c) Let $z=x+iy$ and let $f(x+iy)=x^{3}+xy^{2}+i(x^{2}y+y^{3})$
    (d) Let $z=re^{i\theta }$ and let $f(z)=re^{-i\theta }$
    (e) Let $z=x+iy$ and let $f(z)=e^{ix}$
Question 7: State 4 ways to test if a function $f(z)$is holomorphic.
# Complex Conjugation/Rules/Fact/Proof/Exercise

Prove the following properties of the
complex conjugation.
* ${\overline {z+w}}={\overline {z}}+{\overline {w}}$.
* ${\overline {-z}}=-{\overline {z}}$.
* ${\overline {z\cdot w}}={\overline {z}}\cdot {\overline {w}}$.
* For $z\neq 0$ we have ${\overline {1/z}}=1/{\overline {z}}$.
* ${\overline {\overline {z}}}=z$.
* ${\overline {z}}=z$ if and only if $z\in \mathbb {R}$.
# Complex Conjugation/Rules/Fact

For the complex conjugation, the following rules hold (for arbitrary $z,w\in \mathbb {C}$).
* ${\overline {z+w}}={\overline {z}}+{\overline {w}}$.
* ${\overline {-z}}=-{\overline {z}}$.
* ${\overline {z\cdot w}}={\overline {z}}\cdot {\overline {w}}$.
* For $z\neq 0$ we have ${\overline {1/z}}=1/{\overline {z}}$.
* ${\overline {\overline {z}}}=z$.
* We have ${\overline {z}}=z$ if and only if $z\in \mathbb {R}$ holds.
# Complex Numbers/Introduction

Notice: Incomplete

## Prerequisites

All four operations (+, -, *, /) for the real numbers
The purpose of parentheses in math
Box method for multiplication and/or FOIL

## Meaning of Complex Numbers
### What does i mean?

i is a 'fake', or imaginary number such that i*i=-1. We need to make up a number because 1*1=1 and -1*-1=1.

### Complex numbers

Complex numbers are numbers that 'look like' all of the following:
-1-2i
-3+10i
3-2i
4+3i

## Math of Complex Numbers
### Add

To add complex numbers, you add similar things, so (1+2i)+(3+4i)=(1+3)+(2+4)i=4+6i

### Take away

To 'take away' complex numbers, you 'take away' similar things, so (1+2i)-(3+4i)=(1-3)+(2-4)i=-2-2i

### Times

To 'multiply' complex numbers, you 'multiply' similar things, so (1+2i)(3+4i)=(1)(3)+(1)(4i)+(2i)(3)+(2i)(4i)

#### With Box Method

Using the example of (1+2i)*(3+4i), we get:
| | 1 | 2i |
| 3 | 1*3=3 | 2i*3=6i |
| 4i | 1*4i=4i | 2i*4i=8i*i=-8 |
Going across both diagonals, we get:
(3+-8)+(6+4)i=-5+10i

#### With FOIL

To multiply complex numbers, you multiply using FOIL, like this: (1+2i)*(3+4i)=(1*3)+(1*4i)+(2i*3)+(2i*4i)=3+4i+6i-8=-5+10i

### Divide

To divide complex numbers, you turn it into a multiplication problem, like this: ${\frac {(1+2i)}{(3+4i)}}=(1+2i)*({\frac {3}{(3*3)+(4*4)}}-{\frac {4}{(3*3)+(4*4)}}i)$, which can be solved normally. This works because $(3+4i)({\frac {3}{(3*3)+(4*4)}}-{\frac {4}{(3*3)+(4*4)}}i)=$
$({\frac {3*3}{(3*3)+(4*4)}}+{\frac {4*4}{(3*3)+(4*4)}})+({\frac {4*3}{(3*3)+(4+4)}}-{\frac {3*4}{(3*3)+(4*4)}})i={\frac {3*3}{(3*3)+(4*4)}}+{\frac {4*4}{(3*3)+(4*4)}}={\frac {(3*3)+(4*4)}{(3*3)+(4*4)}}=1$ and dividing is just multiplication by the reciprocal.
| | 3 | 4i |
| ${\frac {3}{(3*3)+(4*4)}}$ | ${\frac {3*3}{(3*3)+(4*4)}}$ | ${\frac {4*3}{(3*3)+(4*4)}}i$ |
| $-{\frac {4}{(3*3)+{4*4}}}i$ | $-{\frac {3*4}{(3*3)+(4*4)}}i$ | ${\frac {4*4}{(3*3)+(4*4)}}$ |

### Conjugate

The conjugate of a complex number is the number you get if you replace the + linking the real and imaginary parts with - or vice versa. Some examples include:
| Complex number | Conjugate |
| 1+2i | 1-2i |
| 1-2i | 1+2i |
| -1+2i | -1-2i |
| -1-2i | -1+2i |
# Complex Analysis/Sample Midterm Exam 2

1. Restrict $-\pi <\arg(z)\leq \pi$, and take the corresponding branch of the logarithm:
    a.$\log -1-i{\sqrt {3}}$
    b.$1^{7+i}$
    c. Find all 4 roots of ${\sqrt {2}}+i{\sqrt {2}}$
    d $\left|e^{\log(2)+i\log({\sqrt {2}})}\right|$
2. State the Cauchy-Riemann equations for a complex valued function $f(z)$. If you use symbols other then $f$ and $z$ indicate how they relate to these quantities.
3. State whether the give function is holomorphic on the set where it is defined.
    a. $\displaystyle 2z+2z^{2}-{\frac {1}{z}}$
    b. Let $z=x+iy$ and let $f(z)=e^{ix}$.
    c. $zg(z)$ where $g(z)$ satisfies $\displaystyle {\frac {\partial }{\partial {\bar {z}}}}g(z)=0$
    d. $|z|$
4. Let $\gamma :[a,b]\to \mathbb {C}$ be a simple closed curve so that $z=0$ lies in the interior of the region bounded by $\gamma$.
    a. Suppose $n\geq 0$ and compute
    $\oint _{\gamma }z^{n}\,dz,$
    simply writing the correct value without any explanation will not receive credit.
    b. We now consider the case corresponding to $n=-1$. Please compute
    $\oint _{\gamma }z^{-1}\,dz,$
    and explain your steps.
    c: Now suppose $n\leq -2$ and compute
    $\oint _{\gamma }z^{n}\,dz.$
5. Let $\gamma :[0,2\pi ]\to \mathbb {C}$ be given by $\gamma (t)=6e^{it}$. Calculate $\displaystyle \oint _{\gamma }{\frac {\cos \zeta }{\zeta +\pi }}\,d\zeta$
6. Let $u(x,y)=x^{2}-y^{2}$ find a function $v(x,y)$ so that $f=u+iv$ is holomorphic in the complex plane and $v(0,0)=1$.
7.
    a. Using the limit characterization of the complex derivative show that ${\bar {z}}$ is not holomorphic.
    b. On the other hand show that if ${\frac {\partial }{\partial z}}{\bar {z}}=0$.
    c. Do parts (a) and (b) contradict each other, explain why or why not.
8. State Cauchy's integral theorem, and intuitively what you need to know about the function, domain and contour.
# Compiling & linking in plain view
### Compiling

* Overview (pdf)
* Preprocessor (pdf)
* Compiler (pdf)
* Assembler (pdf)

### Linking and Loading

* static linking (pdf)
* dynamic linking (pdf)

### ELF

* Overview - ELF (pdf)

### Binutil

* Overview - Binutil (pdf)

### Make

go to [ C programming in plain view ]
# Game programming/Function pointers

In C, pointers are everywhere. You are probably familiar with pointers to variables. Maybe even pointers to structs. A pointer is a variable which holds a memory address. It usually has some useful value, like a acting as a reference to a variable in a different scope. In C, you can also have pointers to functions.

## Requirements

* C knowledge

## Objectives

* To know how to make a pointer to a function
* To know how to use a pointer to a function
* To get to know some usage examples of pointers to functions

## Introduction

First, let's look at a function declaration.
As you can see, we have here a function called "getAvg". It receives two doubles and returns a double.

## Explanation

A pointer to a function does looks mostly not different from a regular function, except it has the '*' symbol as in all pointers, and parenthesis as follows:
Here we have a pointer called "fp", so we'll refer to it as such. It is a pointer to a function that receives two doubles and returns a double. Note how we do not add the parenthesis after getAvg when we assign it's address to fp. Also note the '&' operator. Using a pointer to a function is not different from using a normal function. Hence, we could do the following:

## Application

Pointers to functions serve three general purposes. One is that they provide a way to have methods in structs, the second is that they allow for some degree of polymorphism, and the third is passing functions to functions.
To create methods in a struct,
Note: This example isn't that useful. It requires work. Note: Unless each struct has a possibly different pointer (ie. you aren't just trying to make OOP), then you are wasting space! Just because you can make OOP work in C doesn't mean you should - or even that it's good to do so.
As an example of polymorphism,
Note: you can create an array of function pointers void (*function_pointers) to allow cycling through functions if strictly necessary. Just remember, you the correct expected return operand when cycling through - so if you're switching some pointer through these values, they'd better all have at least the same return size, and preferably same return type.
And an example of sending functions through functions,
# Gameplay

See Gameplay
# Game programming/Collision detection

Collision detection is, as the name suggests, detection of collision. This is a mathematical problem, and an empiric problem.

## Requirements

* C knowledge

## Purpose

* Get familiar with some collision detection types
* Get familiar with the difficulties in collision detection

## Collision detection types

Rectangle collision detection
Circle collision detection

## The difficulties in collision detection

In a static scene without movement, collision detection is simple and reliable. However, when motion is thrown into the equation, things get ugly. If you look at two snapshots of a scene before and after movement, you can check their geometrical figures for collision. However, if a figure moves too quickly or is too small, collision might not register because it doesn't collide with anything on the two snapshots, even though it did pass through another figure and should have registered collision. This is known as tunneling. This is an empiric problem.
# Game programming/Questions

IN CONSTRUCTION
Game programming questions asked by users and answered by Davichito:
1. I want to know about the games and their complexity. What is the simpler and harder games I can make and what do I need to know in each phase?
    The simpler games you can make are text based adventures and turn based games. in construction
2. Tell me about file structure. How should I structure my files?
    The first thing you need to do is to think about a file structure. It should be related to the complexity of your game and the data structures you will use. Here is an example:
   * Folders bmp, cfg, snd, and the code would be in the master directory or in ./src.
    Also, you have to think about a naming convention for your files and structures/classes, variables, etc. They depend on the complexity of the game: most games will need game.c for Game class/structure and other files such as gfx.c, sprites.c, player.c, etc. The most important after determining a basic file structure and naming conventions is the design of the game, point 4.
3. Which libraries and languages can I use?
4. Tell me about game design. I want an example of a simple game design with structures, files and some fields. Also, the interaction between them.
This is usually the most important part of the game. You need to have a robust design for the application to succeed. This includes making structure/class diagrams (depending if your game will use structured or OOP programming), deciding which classes you will have, the use of global variables and specially the dependencies between modules. At this time, you will need to decide which classes will interact with others and if you will use composition or inheritance (in OOP languages).
Composition is including a structure inside another structure, usually through a pointer or reference. This example will clarify it:
   typedef struct _player; { struct sprite * sprite;
    int lives; int energy; unsigned int flags; } player;
This shows the declaration of the type player which includes a pointer to its own sprite. That way the sprite can be accessed from there to be able to draw it, load its images, among other things.
So, using header files each class includes the definitions the other needs. This step is common in programming, so it is a generic concept instead of specific to game programming.
The specific parts of game programming are deciding this structure/class organization. Usually, it may involve having several abstract data types to model the objects in the game. The most common are:
List of possible functions for the behavior of player data type.
The movement functions are pretty straight, they will update the function using the x, y fields and the velocity and acceleration of the player. So, the code would be something like this:
x += vx; y += vy;
notice that some of them can be zero. Discussing jumping is implementing the physics equations related to gravity, which is similar to this.
vx += ax; vy += vy;
The player must have flags or boolean values to know where it's facing. It usually goes inside the sprite structure, so we will discuss that later.
# Dynamics/Kinematics/Coordinate Systems/Spherical
## Introduction

A spherical coordinate system is also useful for describing motion.
Material taken from Vector fields in cylindrical and spherical coordinates

## Position

Vectors are defined in spherical coordinates by (r, θ, φ), where
* r is the length of the vector,
* θ is the angle between the positive Z-axis and the vector in question (0 ≤ θ ≤ π), and
* φ is the angle between the projection of the vector onto the X-Y-plane and the positive X-axis (0 ≤ φ < 2π).
(r, θ, φ) is given in Cartesian coordinates by:
    ${\begin{bmatrix}r\\\theta \\\phi \end{bmatrix}}={\begin{bmatrix}{\sqrt {x^{2}+y^{2}+z^{2}}}\\\arccos(z/r)\\\arctan(y/x)\end{bmatrix}},\ \ \ 0\leq \theta \leq \pi ,\ \ \ 0\leq \phi <2\pi ,$
or inversely by:
    ${\begin{bmatrix}x\\y\\z\end{bmatrix}}={\begin{bmatrix}r\sin \theta \cos \phi \\r\sin \theta \sin \phi \\r\cos \theta \end{bmatrix}}.$
Any vector field can be written in terms of the unit vectors as:
    $\mathbf {A} =A_{x}\mathbf {\hat {x}} +A_{y}\mathbf {\hat {y}} +A_{z}\mathbf {\hat {z}} =A_{r}{\boldsymbol {\hat {r}}}+A_{\theta }{\boldsymbol {\hat {\theta }}}+A_{\phi }{\boldsymbol {\hat {\phi }}}$
The spherical unit vectors are related to the cartesian unit vectors by:
    ${\begin{bmatrix}{\boldsymbol {\hat {r}}}\\{\boldsymbol {\hat {\theta }}}\\{\boldsymbol {\hat {\phi }}}\end{bmatrix}}={\begin{bmatrix}\sin \theta \cos \phi &\sin \theta \sin \phi &\cos \theta \\\cos \theta \cos \phi &\cos \theta \sin \phi &-\sin \theta \\-\sin \phi &\cos \phi &0\end{bmatrix}}{\begin{bmatrix}\mathbf {\hat {x}} \\\mathbf {\hat {y}} \\\mathbf {\hat {z}} \end{bmatrix}}$
Note: the matrix is an orthogonal matrix, that is, its inverse is simply its transpose.
So the cartesian unit vectors are related to the spherical unit vectors by:
    ${\begin{bmatrix}\mathbf {\hat {x}} \\\mathbf {\hat {y}} \\\mathbf {\hat {z}} \end{bmatrix}}={\begin{bmatrix}\sin \theta \cos \phi &\cos \theta \cos \phi &-\sin \phi \\\sin \theta \sin \phi &\cos \theta \sin \phi &\cos \phi \\\cos \theta &-\sin \theta &0\end{bmatrix}}{\begin{bmatrix}{\boldsymbol {\hat {r}}}\\{\boldsymbol {\hat {\theta }}}\\{\boldsymbol {\hat {\phi }}}\end{bmatrix}}$
# Dynamics/Kinematics
## Introduction

Content from Kinematics and Robot kinematics
Kinematics is a subfield of physics, developed in classical mechanics, that describes the motion of points, bodies (objects), and systems of bodies (groups of objects) without considering the forces that cause them to move. Kinematics is the science and math of describing the configuration, position, velocity, and acceleration of an object or a machine. We ignore the dynamics or changes in velocity/acceleration due to inertia of the machine. We also ignore internal or external forces that may be acting on the machine.
Robot kinematics applies geometry to the study of the movement of multi-degree of freedom kinematic chains that form the structure of robotic systems. The emphasis on geometry means that the links of the robot are modeled as rigid bodies and its joints are assumed to provide pure rotation or translation.

## Topics

* Coordinate Systems
* Reference Frames
* Angular Velocity
* Angular Acceleration
* Rotating Frames
# Dynamics/Linearization/Numerical Solutions
## Introduction

Determining numerical solutions to non-linear problems continues to receive attention by many researchers in data science and engineering. While they may appear simple, non-linear expressions, especially those with multiple inputs, can have intractable analytical solutions. Thus, numerical results can illuminate underlying empirical behavior and be sufficient for control in real-world applications.

## Topics

* Single Variable with MATLAB
* Ordinary Differential Equations
# Dynamics/Kinematics/Coordinate Systems
## Introduction

Coordinate systems are essential to defining the position, motion (velocity and acceleration), and configuration of multi-body systems.

## Topics

* Cartesian
* Polar
* Cylindrical
* Spherical
* Normal-Tangential
# Dynamics/Linearization
## Introduction

We can use linearization to simplify or evaluate non-linear expressions at a location near a specified value based on the local slope of the expression.

## Topics

* Series Expansions
* Numerical Solutions