OpenLLM-France/wikimedia huggingface dataset:
# Rust for the Novice Programmer/Functions
## Functions

Let's say we wanted to do the x$^2$ + 5 again but to y with a starting value of 7. What would that look like?
This will work, but say we wanted to change it to x$^2$ + 8 for both of them. This means we would have to change it in both locations. This doesn't seem like too much effort here, but these patterns of wanting to do the same things, just with slightly different values is very common. Therefore we can separate this out into a function. Let's take one of them first:
This will work, except the point of a function is to take in input(s) that can have different values. The way to put an input into a function is to put it inside the brackets. You put the name of the input, similar to the name of a variable, then you have to explicitly write out the type of the input.
Note that we set value to the value of input. This means since we use the 'mut' keyword, we can modify the value inside the function. Alternatively we could put mut before 'input' and then input would be modifiable. Next we can change main to
This means the code is a lot easier to modify and separate out, making it easier to read and edit later.
An alternative way might be if we wanted to not print out inside the function and instead output the different value, so that the main function can print it out or do anything it wants with it. This is called returning and you specify the return value with '-> type'. For example, the function will return an integer, so we return i32 by adding '-> i32' after the but before the.
Then we print the values in the main function as so:
This lets us do more interesting things, like chaining function calls together. For example we can change the main to:
This does the x$^2$ + 5 on 10 twice, so we get 11030. This has just been a rough overview of functions and their usefulness.
Next: if statements and booleans
# Rust for the Novice Programmer/CSV Program
## Making a Simple CSV Analysis Program

In this program, we will learn more about traits, including generics and become more comfortable with programming ideas like collections.

#### What is CSV?

CSV or comma separated values is a very simple file format for storing data in a file. Essentially as the name suggests it is just values separated with commas. Each line indicates a new set of values. The first line is headers, indicating what each value means. Here's an example to make it clearer:
Let's say we wanted to store video game characters' stats, we could use something like this: ID,Attack,Defense,Health,Speed 1,10,20,25,5 2,30,10,10,30 3,40,40,10,10 4,10,40,50,5
Thus we would have 4 characters, our first character would have id: 1, attack: 10, defense: 20, health: 25, speed: 5. Our second character would have id: 2, attack: 30, defense: 10, health: 10, speed: 30. etc.

#### Program specifications:

* Will parse CSV values from a file and print out some stats about them
* Will feature simple methods for reading new records
* Will feature simple methods for writing new records
Next: Setting up a CSV file and basic parsing
# Rust for the Novice Programmer/CSV Program/CSV File and Parsing
## Adding CSV file and Parsing

Ok, let's again create a new cargo program with 'cargo new csv-program'.
For our testing csv file, we will use this simple letter frequency csv file:
Simply copy and paste this into a new file under the project root, so directly under csv-program, called 'letter_frequency.csv' Then we can start coding.
First, we will read the file into a string in Rust. For this, we can use the very convenient function std::fs::read_to_string. Again, we will 'use std::fs;' to make it more convenient when calling the function.
If we run this, we should see the contents of the file printed to the terminal!
Now we want to parse the file line by line. The first line should be handled differently as it should be the headers of the file. To do this, we can use the lines function on an str. This gives us an iterator but we will need to learn the basics of iterators to use it for what we want.

##### How iterators work

An iterator is a struct that implements the trait 'Iter'. This trait simply requires that the struct has the function:
All other behaviour can be derived from this function. Notable about this function is that it requires a mutable reference to the struct, meaning that once the iterator has been used once, it is used up and can't be used again. Another notable thing is that it returns an Option of the type of the iterator which is how we know whether it is finished; it returns a Some of the item if the iterator has items left and None if the iterator has finished.
Therefore we can do this to get the first line:
Note we can still use the iterator after removing the first line in a normal for loop and it will iterate through all the lines except the first. Also we simply unwrap the first line since we are supplying the file we can assume it will have a first line but this may not be true for all files.
To split each line up based on commas, we can use the split function which can take in a string or char and outputs an iterator over the different parts of the string. But we want to store these parts in a vector which can be done using the collect function so let's wrap this all into its own function:
And then we change our main function like follows:
Next: parsing numbers from our csv file
# Rust for the Novice Programmer/Hello World
## Hello World!

It is a tradition in programming that the first program people see is one that prints 'Hello World'.
Make a folder to store your learning exercises in and inside make a folder.
You can call it anything you want but an example name might be 'hello_world'.
* Open the terminal inside this folder.
* Type 'cargo init'
* You should notice the following things inside the folder:
* .git (you might not see this if you have hidden items turned off)
* .gitignore
* Cargo.toml
* src folder, inside which is main.rs
* For now we will only concern ourselves with main.rs which is inside src so open this in your text editor.
Inside you will see:
What does this mean?
* 'fn' is short for 'function'. We will revisit this later, for now just know it is a collection of code.
* 'fn main' means it is a function called 'main'.
* The main function is special as it is the start point of your program.
* The braces { and } indicate the beginning and end of the function.
* Then the line 'println!("Hello, world!");' is made up of different parts:
* 'println!' is the name of the function being called. We don't need to know that much except the stuff between ( and ) will be printed to the terminal.
* Then the " " quotes around "Hello, world!" indicates the stuff inside is some text.
To run this, type 'cargo run' in the terminal. You should see the lines showing the code being compiled, then the text
being printed to the terminal!
You can try changing the text within the "" quotes to see different messages being printed!
Next - numbers in Rust
# Ordinary Differential Equations/Old contents
### old table of contents

* Form and Solutions of Differential Equations
* First-Order Differential Equations
** Separation of Variables
** Linear Differential Equations
** Exact Differential Equations
** Substitution Methods
** Bernoulli Equations
** Ricatti Equations
** Orthogonal and Oblique Trajectories
** Equations of higher degrees
** Equations without x or y
** Equations that are homogeneous in x and y
** d'Alembert's Equation
** Clairaut Equations
** Legendre Transformations
** Graphing Differential Equations
* Second-Order Differential Equations
** Constant Coefficients
** Series Solutions
** Hypergeometric Equation
** Frobenius Solution to the Hypergeometric Equation
** Legendre Equation
** Bessel Equation
** Mathieu Equation
** Continued Fraction Solutions
** Applications of Second-Order Differential Equations
* Higher Order Differential Equations
** Linear equations
*** General Linear Equations
*** Infinite Series Solutions to Linear Equations
** Integration methods
*** Laplace Transform
*** Bessel Function
*** Euler Transform
*** Mellin Transform
*** Hypergeometric Series
*** Double Integration
* Sturm-Liouville theory
* Systems of linear differential equations
* Nonlinear Systems
* Green's Functions
* Existence and Uniqueness of Solutions
** Global uniqueness of solution over interval
** Maximum domain of solution
** The Successive Approximations Method of Proof
** Applications to Linear Equations
** The Cauchy-Lipschitz Method of Proof
** Existence Theorems for Complex Numbers
* Continuous Transformation Groups
** Infinitesimal Transformations
** Invariant Functions
* Glossary
* List of Some Equations
* Help Needed
* Roadmap
# Ordinary Differential Equations/Separable 3
## Existence problems

Tell whether the following initial value problems have a solution or not, and if its solution is unique.
1) $y'=(12x^{2}+5x)(y+9y^{3}),y(7)=11$
2) $y'=ln(7x),y(-1)=10$
3) $y'={\frac {x+7x^{2}-6x^{3}}{y^{2}-1}},y(0)=16$
4) $y'=xln(y-1),y(1)=1$
5) $y'={\frac {x^{3}+5x}{y^{2}+7y+12}},y(5)=9$
6) $y'={\frac {y+7y^{2}}{x-5}},y(5)=4$

## Separable equations

7) $y'=y^{3}sec^{2}(x),$
8) $y'={\frac {5y^{2}+6}{y}}$
9) $y'=x^{3}/y^{3}$
10) $y'=x^{2}+3x-9$
11) $y'=cos(y)/sin(y)$
12) $y'={\frac {cos(x)}{sin(y)}}$

## Initial value problems

13) $y'=cos(x)+sin(x),y(0)=1$
14) $y'=7y^{2},y(5)=9$
# Ordinary Differential Equations/Riccati

The Riccati Equation
${dy \over dx}+f(x)y^{2}+g(x)y+h(x)=0$
is different from the previous differential equations because, in general, the solution is not expressible in terms of elementary integrals.
However, we can obtain a general solution from a single particular solution when one is known.
Let $y_{1}(x)$ be a particular solution, and let $y(x)=y_{1}+z$
so that the equation becomes
${dy_{1} \over dx}+{dz \over dx}+f(x)(y_{1}^{2}+2y_{1}z+z^{2})+g(x)(y_{1}+z)+h(x)$ $={dz \over dx}+(2y_{1}f(x)+g(x))z+f(x)z^{2}=0$
which is a Bernoulli equation.
# Seiken Densetsu 3/Part 1: The Hero of Mana/Angela

Angela is, to put it bluntly, the family failure. Altena is a land of powerful wizards and sorceresses, and her mother, Valda, is the Queen. Yet, Princess Angela doesn't have magical abilities. Yet.
Anyway, talk to Jose, then run outside.
# Seiken Densetsu 3/Part 1: The Hero of Mana/Hawk

Sit back and watch the thieves dash through Sand City Sultan. When Hawk enters the room, you have control. Open the chest, taunt the businessman, then jump out the balcony door. The cutscene continues.
When the cutscene completely ends, you now have an opportunity to explore. You should definitely explore this place, as you will be coming back here much later in the game. Anyway, you need to find Eagle. His room is the easternmost room in the fortress. You'll have to go outside through a balcony to reach it.
From the outside, you can see Eagle pacing through his window. Go in and talk to him. Agree with him and he'll storm off to Flamekhan's bedroom. Go meet him there. The room is to the right of the throne room.
Watch Isabella talk with the strange vampire-like man, then fight Eagle. Don't worry, you won't actually kill him. Just hit A until he gets knocked out. Isabella will then cast Fireball on him, and kill him. Now, watch the cutscene.
Wow. Sucks, huh? You've been framed. Poke the jail door, or poke the rear wall. Stuff will happen. After Nikita lets you out, leave Navarre. Try not to get killed by ninjas.
Watch the credits roll, and laugh at how much of what you just did was scripted.
# Seiken Densetsu 3/Part 5: A Gneed for Gnome

Rest and save. Now, go to the easternmost house in Maia. There's a staircase leading to the door. Go inside and talk to the short Frenchman. This is Bon Jour. He has a cannon behind his house. Talk to him and he'll tell you to go out back. Follow him and prepare to be disappointed. Yep, he needs gunpowder. But, where do we get it?
There's a bald NPC with a read beard in front of the inn. Talk to him, then head back to the Road. Go back to the Cleft of the Earth. The bald guy can't tell you this next part. Talk to the Silver Statue and use Wisp. The wall will open, revealing your new path. Go down the long tunnel. Take note of the walkways stretching across the stairs — you'll be running on them soon enough. At the bottom, follow the path to the dwarf village.
The dwarf village is a fairly awesome place. Go to the item shop and ask for Watts. Watts is the item shopkeeper, and he also has gunpowder. However, he's not there. Oh well. Go to the weapon shop and armor shop and equip yourself. The equipment here is expensive — that's why I said earlier that I don't waste money buying things in Maia. Use your leftover cash to fill up on supplies, then rest, save, and head out.
Right outside of the dwarf village, talk to the dwarf digging there. He'll open up a new tunnel for you. Go inside. Follow the path until you see a dwarf. That's Watts. You can't get to him just yet. Go west and then follow the northern path. Keep going, and you'll find him standing in an empty room. Go to him and talk to him. He wants 5,000 gil for the Gunpowder. You almost certainly don't have that; it doesn't matter, because he'll run off again. Follow him. Keep on the path through the tunnels, and at the end, you'll find yourself in another room with Watts. Heal up, then talk to him to start the next boss fight.

### Boss: Jewel Eater

This guy can be tough if your levels are low. However, if you're keeping up, you should be level 6, which is just fine for this fight. Jewel Eater is weak to Thunder Magic, but since you don't have any yet, just hit him with normal attacks. If you have Angela, use up all of her MP on Holy Ball. If you have any Assassin Bug Eyes, you can use them. Just keep hammering away and keep your HP above 70 or so. Jewel Eater's Magic list includes Diamond Missile and Defense Down.
After you beat the Jewel Eater, Gnome comes bouncing down and has a small story to tell. He then joins your party. Also, Watts apologizes and gives you Gunpowder. It's time to leave now — we're finally going to Forcena!
Continue to Part 6: Bon Jour, Gunpowder!.
# Seiken Densetsu 3/Part 1: The Hero of Mana/Duran

Duran's quest is arguably the hardest. It's also one of the coolest. You start out immediately in control of Duran. The guy across from you, Bruiser, is fighting against you in a tournament. Use your A attack, and when the bar at the bottom of the screen glows green, press B to knock him on his back. He's really easy. After you beat him, King Richard will congratulate you. You then get a nice, long, detailed cutscene. Remember what Loki looks like. We'll see him again. Also, pay attention when he talks about the Dragon Emperor.
You'll be rudely awakened by a man in red floating around crazily. Follow him. He'll reveal himself as a wizard, and play with you before hitting you with Fireball and Ice Smash. Continue through the cutscene until you have control again. Clearly, Duran is a drinking man. Anyway, leave the tavern, and go to the room up the stairs on the outside. Talk to the fortune teller. She'll tell you to go to Wendel and that you can get stronger through Class Changing. Go back to Duran's house. In Duran's room, open up the chest, then leave the house. The next 30 seconds are teary-eyed scripts. Go talk to King Richard before you leave. Afterwards, just take off! Head south, then follow the path until you reach the Cleft of the Earth. Cross the bridge, and then sit back and watch the credits.
# Seiken Densetsu 3/Part 3: Waterfalls, Wendel, and Wisp

When you're satisfied with your current level, go right from the screen north of Astoria. You will meet your partner outside the Cave of Waterfalls, looking to get in. The Fairy removes the barrier, and you can now enter the Cave.
The Cave of Waterfalls is a nice little maze. For now, you are just trying to get to Wendel. Go down into the cave, past the Gold Statue. Save if you want, then continue into the cave and head west. This guide will typically not have directions for you. Instead, explore the caves and dungeons, and don't be afraid to go into strange rooms. There are no random encounters, so the actual number of enemies is quite low. Just don't move too fast, and backtrack to a Gold Statue if you find yourself running low on health. There's no boss here. Oh, and if you ever find yourself "Trapped!" in a room, simply clear it of enemies and the door will open again.
When you finally get to Wendel, you have two options. You can either buy armor, weapons, and items, or you can go speak to the Priest of Light. You'll do both before leaving, but you can do them in either order.
{This paragraph reserved for a nice long discussion on how to select and equip weapons, and how to store and use items}
The Priest will tell you that Mana is starting to fade. This is bad. He will tell you to retrieve Wisp from the Cave of Waterfalls. This is good. Wisp is the first elemental spirit. He represents Light Magic.
Go back into the Cave of Waterfalls. Go to the Gold Statue. As you progress, note the waterfall room where the Fairy remarks upon Wisp's presence. That room has two entrances. Go north to the second entrance to the room, and use the Fairy to cross the waterfall. Follow the path until you reach a fork and can go to the left or right. Go left first and save at the Gold Statue. Now, go back and go right, until you reach a big, empty cavern. Time for your first boss!

### Boss: Full Metal Hugger

This guy is not too bad, but then again, he is your first boss. Just hit him repeatedly. If he poisons you, use Puipui Grass to cure it. Keep your HP above 30 or so and you'll be fine. He can block attacks for a few seconds by closing his eyes. He also knows Holy Ball and Heal Light, and will heal himself once or twice during a normal battle. He is weak to Dark attacks, but since you do not have Dark Saber or Evil Gate yet, the most you can do is make sure the fight takes place at night. The battle is halfway over when his eye vanishes.
After Full Metal Hugger is gone, Wisp shows up. He joins you. Now, leave the Cave. You'll be ambushed by Lugar at the waterfall, and thrown in jail in Castle City Jad. Your second partner will be in the cell next to you. Try the cell door and you'll be introduced. Your second partner will use a trick to open the gates, and will then join you. Head south out of the castle and to the harbor, where a ship will take you away.
Continue to Part 4: Follow the Golden Brick Road.
# Seiken Densetsu 3/Part 1: The Hero of Mana/Carlie

Sit back and watch the cutscene. Carlie's an orphan. The white-haired cleric, Heath, is Carlie's guardian; the old priest is the Priest of Light. Carlie stands in the shadows and listens to the two talk about strange things happening to Mana.
After the cutscene finishes, go exploring. Talk to the NPCs if you want a feel for what Wendel is like. When you're ready to move on, go back to Carlie's room, and go to the room across the hall; it's the door on the left-hand side of the room where Carlie bumped into Heath. Carlie's friend Mick is in there. Talk to him. After you finish, go back to Carlie's room and sleep.
Okay, now it's nighttime. Go outside, laugh at the insomniac NPCs, and then head to the terrace. If you didn't find it earlier, go south from Carlie's room and then go to the right-hand exit to get to the ledge. Mick will pull out a banekujako. My Japanese is not too hot (anybody out there?), but it's basically a cute yellow spring. Step on it and you will exit the Temple in a rather unique fashion.
You will land rather unceremoniously on top of your soon-to-be teammate, who will take you to Astoria. Remember the area where you fall and what it looks like: This is the entrance to the Cave of Waterfalls.
After some dialogue, you can move again. Go north. Practice fighting with the Rabites - for now, just hit A to bonk them. Next chapter, you will learn how to fight with more powerful attacks. Continue north, and you will find Heath. The cutscene explains itself, so all I will say is to note carefully the three Magic animations you see. They are Holy Ball, Black Curse, and Evil Gate. You will see them again, and Carlie can actually learn Black Curse down the road.
After this, watch the credits roll, then continue to the next part of the walkthrough.
# Seiken Densetsu 3/Part 4: Follow the Golden Brick Road

You will arrive in Maia, the Free City. Your new destination is Forcena, where King Richard can tell you everything you need to know about Mana Stones. It will take you three chapters to get there, so let's get going!
If you have the cash, equip everybody with weaponry from Maia. I personally skip this step, because I save up for the more expensive dwarf weapons, but it's up to you. Anyway, make sure you stock up on Round Drops and Angel Grails. Now, leave the city to the west. A sailor will stop you and tell you that the Priest of Light has fallen ill while erecting the barrier. This is bad. Leave Maia and you will be on the Golden Road.
The Golden Road is a simple path filled with Porons and Assassin Bugs. It connects Maia to Merchant City Byzel, which will become very important in the second part of the game. For now, the three invasions that the beastmen, ninjas, and wizards are carrying out has caused them to close the city to foreigners. That doesn't matter.
(need to put a quick tutorial on switching characters and abilities)
Three screens away from Byzel, on the Golden Road, there is a cave that leads to the Cleft of the Earth, a giant snakelike trench running across the continent, which separates Forcena and the Molebear Highlands from Byzel and Maia. There is a bridge going across it. This is where you need to go.
The entrance to the cave holds a Silver Statue. Save. The next screen is the Cleft and bridge. Walk onto the bridge and you will be greeted by some Altenians and their Machine Golems.

### Boss: Two Machine Golems

Machine Golems are strong, but these two aren't too tough. They don't know any Magic, so feel free to use Holy Ball if you have Angela. Carlie should know Heal Light by now, but if you don't have her, just keep your HP decently high. The Machine Golem's strongest attack at this point is probably the Drill Punch, but you can dodge it by staying out of their line of sight whenever they glow red. If you were fortunate enough to pick up any Assassin Bug Eyes earlier, use them; they do about 90 HP of damage. Keep at it and they'll die soon enough.
However, one of the Golems self-destructs, blowing up the bridge. Obviously, you need to get to Forcena another way. How? Go back to Maia.
Continue to Part 5: A Gneed for Gnome.