OpenLLM-France/wikimedia huggingface dataset:
# Scheme Programming/Using Variables
### Using Variables

In order to make your program a little more dynamic, it is often necessary to declare a variable. There are 2 main ways of doing this, using define and let. The difference between the two is simple once fully grasped.
For example, using define:
This shows that even once used, the variable x continues to exist, it is defined for all to see, use and (as we shall see later on) modify at will.
In general, the form of a define statement for a variable is as follows:
Now we will see the use of let
Notice here, how once the block of code has finished executing, the variables x and y are no longer accessible. This is a very bulky and slow way to do this at this point, but it allows for more elegant programs later.
In general, the form of a let statement is as follows:
Variables in Scheme are dynamically typed, so there is no need to declare the type of the variable when you define it. Moreover, if you want to change the value of a variable, you can change it to any value you like - the same variable can hold any type of data. This can be beneficial when a function returns two different types of values and you wish to store the result in a variable regardless of what the result is:
If we were using a language such as Java, which uses static typing, this would not be allowed. As evidenced by the example, a common use of dynamic typing is to have a function return one type of value (e.g. a number) if the function call was successful, and another (here a string) if the function failed. Of course, despite dynamic typing, illogical actions such as attempting to multiply two symbols together will still fail, so when a function returns two possible types, be sure to determine the type of the value that was actually returned before attempting to use it.
# Scheme Programming/Vector Operations
## Vector Manipulation
### Accessing Elements

Vector-ref takes two arguments, a vector and a valid index of the vector, and returns the element at that index.
Notice how the vector is zero indexed. I.e. the first element of a vector is referenced by number 0.
# Scheme Programming/Simple Expressions

As we have already seen, Scheme expressions have the form:
However, much simpler expressions are possible; all of the following are valid Scheme expressions and will be evaluated by the interpreter.
We have, in their respective order:
* A number
* A Boolean
* A complex number (A number with and imaginary component)
* A list
* A pair
* A vector
* A primitive procedure (I.e. something that scm can use in order to evaluate data)
# Scheme Programming/TinyScheme

TinyScheme is a lightweight Scheme interpreter of a subset of the R$^5$RS standard. It is meant to be used as an embedded scripting interpreter for other programs. Much of the functionality in TinyScheme is included conditionally, to allow developers to balance features and size/footprint.
TinyScheme is used by GIMP starting with version 2.4, released in 2007. GIMP previously used SIOD.
TinyScheme was used as the core of Direct Revenue's adware, making it the world's most widely distributed Scheme runtime.

## Some Tutorials
### Saving a textfile

The last line is especially important as elsewise the file would not be closed and could not be modified by other programs until e.g. GIMP is closed

## References

* ↑ "GIMP - Script-Fu Migration Guide". gimp.org. Retrieved November 5, 2011.
* ↑ http://web.archive.org/web/20170606051321/http://philosecurity.org/2009/01/12/interview-with-an-adware-author

## External links

* TinyScheme home page
* (link does not work)TinyScheme Documentation
# Scheme Programming/Procedures

So far, we've worked with many built-in Scheme procedures (like +, *, etc.), but we haven't seen how to define our own. Procedures are created with the lambda form. Here's a simple example:
Evaluating a lambda form gives us back a procedure object, which we can treat like any other value. Unlike the built-in procedures that we've been working with, though, this procedure lacks something important--a name. The procedures constructed with lambda are thus called "anonymous"; if we want to apply them, we have to write out the lambda expression as the operator of an application:
How does this work? As we saw in previous sections, we evaluate an application of a procedure to some arguments by first evaluating both the operator (which is (lambda (x) (* x x)) here) and the operands. Our lambda expression evaluates to an (anonymous) procedure of one argument, x, which returns the value of x squared. Applied to the value 4, this procedure returns 16.

## Naming procedures

It's impractical--though certainly not impossible--to write programs using only anonymous procedures. Even relatively simple programs would become unbearably complicated if we had to write lambda expressions for every operator, rather than using convenient names. Since procedures are values, we can gives names to them with define, just as we can any other value:
Here, we define square to mean the procedure (lambda (x) (* x x)). Once this is done, we can use square as a procedure anywhere we like. Scheme makes no distinction between built-in and newly-defined procedures, so procedure definitions are a crucial way in which Scheme programmers extend the language.
It's a bit clumsy to have to write (define <name> (lambda (<arg> ...) ...)) every time we want to write a procedure, so Scheme provides a shorthand. We can also write our definition of square as follows:
The general form of this shorthand is:
This definition is the same as the one with the explicit lambda expression, but it's a little quicker to type. You'll see this form of definition constantly in Scheme code.

## Variable number of arguments

You can also create procedures with a variable number of arguments:
This will create procedure sum which works identically to the native + procedure.
This is the same as:
Note that there are no parentheses around the args parameter so all arguments will be put into one list named args.
With lambda, if you want to have one fixed argument and the rest of the arguments optional you can use an improper list:
With this, you can create procedures with optional arguments:
This will create a procedure that evaluates (/ first 1) when no second argument is provided or (/ first second).
# Semiconductor Electronics/DC Biasing-BJTs

* Introduction
* Operating point
* Fixed-Bias Circuit
* Emitter-Stabilized Bias Circuit
* Voltage-Divider Bias
* DC Bias with Voltage Feedback
* Miscellaneous Bias Configurations
* Design Operations
* Transistor Switching Networks
* Troubleshooting Technique
* PNP Transistors
* Bias Stabilization
* Software
# Semiconductor Electronics/Diode/Ideal Diode

An Ideal diode has the following characteristics. Practical realization of ideal diode is an impossibility because of physical limitations. However an ideal diode makes the student to grasp about diode concepts in a quick and crisp manner.

## Zero Forward Resistance

An ideal diode has zero forward resistance. This means if current passes through a diode, it produces no heat loss. In other words an ideal diode in its forward bias acts like a closed switch in a electrical circuit.
# Semiconductor Electronics/Diode/Zener Diodes

A Zener diode is not like a normal diode because once the Zener voltage is reached, electricity begins to flow from the cathode to the anode; opposite from a normal diode. This occurs because of the Zener Breakdown Principle.
# Semiconductor Electronics/Diode/Diode Maths
## Experimentation method

Above shown is a apparatus to measure the characteristics of a diode. This apparatus has got a regulated voltage supply V$_s$. A potentiometer POT is used to get a variable voltage supply from 0V to V$_s$. A Voltmeter is connected parallel to the diode to measure voltage drop across the diode, an Ammeter is connected in series with the diode to measure the current flowing via the diode.
The voltage must be varied from 0V to V$_s$ and the corresponding Voltmeter and Ammeter readings must be noted in a tabular format

## Diode I-V Characteristic Curve

    Figure : I–V characteristics of a P-N junction diode (not to scale).
    $I=I_{\mathrm {S} }\left(e^{V_{\mathrm {D} }/(nV_{\mathrm {T} })}-1\right),\,$
where
    I is the diode current,
    I$_S$ is a scale factor called the saturation current,
    V$_D$ is the voltage across the diode,
    V$_T$ is the thermal voltage,
    and n is the emission coefficient, also known as the ideality factor.
The saturation current I$_S$ is typically very small, so the diode current is often approximated as
    $I=I_{\mathrm {S} }e^{V_{\mathrm {D} }/(nV_{\mathrm {T} })}$
The emission coefficient n varies from about 1 to 2 depending on the fabrication process and semiconductor material and in many cases is assumed to be approximately equal to 1 (thus omitted). The thermal voltage V$_T$ is approximately 25.7 mV at room temperature (25 °C or 298 K) and is a known constant. It is defined by:
    $V_{\mathrm {T} }={\frac {kT}{q}},$
where
    q is the electrical charge of the electron (the elementary charge), often called e
    k is Boltzmann's constant,
    T is the absolute temperature of the p-n junction.
# Semiconductor Electronics/Diode Applications

* Polarity Detector
* Half Wave Rectifier
* Full Wave Rectifier
* Clipper and Clamper
* Modulator and Demodulator
* Voltage Regulator
# Relational Database Design

This book is intended for students that have at least an undergraduate introduction to elementary computer science.

## Table of contents

* Introduction
* Basic Concepts
* Constraints
* Relationships
* Normalization
* Retrieving data
* Logical vs. Physical design
* Transactionality
# Relationships
## General
### About This Book

    List of authors, organization, and notes.

### Recommended Books

    Selected books to read if you would like to learn more.

### Q&A

    Ask any questions you have about relationships.

## The Science of Relationships
### The Evolution of the Human Brain

    What makes us distinct from other animals.

### Hormones

    The sexual peaks of women's monthly cycles - and how men can boost their testosterone without pills or patches.

### How Our Ancestors Lived

    We're rediscovering the peaceful, egalitarian lifestyle of our ancestors.

### Communication Styles

    Communication to form hierarchies, as opposed to communication to form support circles.

### How Women Select Men

    High-status, entertaining men attract women's attention. Continual emotional connection makes women want a lasting relationship.

### How Men Select Women

    Visible beauty attracts men's initial attention, but it is a woman's inner beauty that makes a man want a lasting relationship.

### Monogamy and Polygamy

    Throughout history, many humans have been moderately polygamous. So are modern "serial monogamists."

## Life Stages
### Childhood - Seeking Unconditional Love

    ...and what happens to people who weren't loved as children.

### Adolescence - Seeking Romantic Love

    Young people feel passionate desire for mirrors of themselves.

### Adulthood - Families And Forgiveness

    Mature individuals love their real partners.

### Agape - Altruistic Love

    How loving one individual leads to loving others.

## Practical Advice
### Where Couples Met

    Friends and family introduced them at school, work, and church.

### Flirting

    How to be fascinating to the opposite sex.

### How to Write a Personal Ad

    ...and find a website or publication that gets you dates.

### Dating

    Help your date experience a wide range of emotions.

### Sex

    Pregnancy, STDs - and tips for better kissing and "aural" sex.

### Becoming a Couple

    Switch gender roles to move from dating to a committed relationship.

### Conflict In Relationships

    Learning to love while accepting disagreement makes you healthy and, in the long run, happy.

## Personality Types
### Emotional Control Systems

    The basis of personality types.

### Zeus-Hera

    Power, tradition, and social status.

### Poseidon-Athena

    Integrating emotions with prudence.

### Apollo-Artemis

    Adventure and good sense.

### Hermes-Hestia

    A fun, happy home.

### Ares-Hephaestus-Aphrodite

    The weekend warrior and the movie star.

### Dionysus-Demeter

    Wounding and healing.

### Hades-Persephone

    Transformation and transcendence.
# Saylor.org's Ancient Civilizations of the World/African Civilizations

Four major areas of civilization emerged in early Africa: the grasslands south of the Sahara, western Africa, the northern desert regions, and eastern Africa. Each area was unique, but the regions became more interconnected as a result of two major developments: the domestication of the camel and the arrival of Islam in Africa. The camel facilitated trade over long distances, including the vast Sahara Desert, while Islam connected Africa more closely to cultures and trade systems in the Mediterranean and the Middle East.
In this unit, we will examine the emergence of highly varied African kingdoms. Some, such as Mwenemutapa, developed in isolation from much of the rest of Africa, while others, such as the Swahili kingdoms in east Africa, were heavily influenced by the Arab world. We will pay close attention to commercial and agricultural advancements in Africa as well as to the rise and impact of Islam.
# Saylor.org's Ancient Civilizations of the World/Rise of Classical Greece
## Introduction

The history of Greece is undoubtedly that of one of the most influential civilizations in the history of mankind. This tiny region at the southern tip of the Balkan peninsula produced or improved upon democracy, the alphabet, philosophy, theater, and the sciences. Even the word history itself comes from the Ancient Greek word ιστορία.
The history of Greece begins long before our earliest written records. Archeology has provided us with what little information we have about such civilizations as the Minoans, Mycenaeans, and the world of the Greek Dark Ages. These civilizations were not even believed to have existed until very recently, when archeologists began to think the epic poetry of Homer's Iliad might contain more truth than previously thought. During the Classical Period, Greek culture was reborn and flourished, and was spread throughout the Mediterranean Sea by the Athenian Empire, as well as other Greek traders, colonists, and conquerors.
The Peloponnesian War (431-404 BCE) between Athens and Sparta, and their respective allies, greatly weakened Greece's collective power, and by 336 BCE, nearly every Greek city-state was under the control of Macedon, and for the first time united into a single political unit. Alexander III, the next king of Macedon, took this united Greece and with it conquered the entire known world, spreading Greek culture (called Hellenism, or ελληνισμος) from Egypt, through Persia, all the way to India. Upon the death of Alexander the Great (as he would come to be known), the Empire split into fourths. A united Greece was one of the four new kingdoms, which lasted until 168 BCE, when Macedonia was absorbed into the growing Roman Republic. The entirety of Greece came under Roman rule by 146 BCE.

## Attribution

"History of Greece: Introduction" (Wikipedia) http://en.wikibooks.org/wiki/History_of_Greece/Introduction
# Saylor.org's Ancient Civilizations of the World/Qin Reforms and Bureaucracy
## Qin Reforms and Bureaucracy

The Qin government was highly bureaucratic, and was administered by a hierarchy of officials, all serving the First Emperor. The Qin put into practice the teachings of Chinese philosopher Han Fei, allowing the First Emperor to control all of his territories, including those recently conquered. All aspects of life were standardized, from measurements and language to more practical details, such as the length of chariot axles. King Qin Shi Huang (259 BCE – 210 BCE) and his advisers also introduced new laws and practices that ended feudalism in China, replacing it with a centralized, bureaucratic government. Under this system, both the military and government thrived, as talented individuals could be more easily identified in the transformed society. Later Chinese dynasties emulated the Qin government for its efficiency, despite its being condemned by Confucian philosophy. Such a system, however, could be manipulated by power-hungry individuals; one example of such an occurrence was documented in the Records of Officialdom. A commander named Hu ordered his men to attack peasants, in an attempt to increase the number of "bandits" he had killed; his superiors, likely eager to inflate their records as well, allowed this.
King Qin Shi Huang also improved the military, despite the fact that it had already undergone extensive reforms. The military used the most advanced weaponry of the time. The invention of the sword during the Warring States Period was a great advance. It was first used mostly in bronze form, but by the third century BCE, the Qin were using stronger iron swords. The demand for this metal produced resulted in improved bellows. The crossbow had been introduced in the fifth century BC and was more powerful and accurate than the composite bows used earlier. It could also be rendered ineffective by removing two pins, which prevented enemies from capturing a working crossbow.
The Qin also used improved methods of transportation and tactics. The state of Zhao had first replaced chariots with cavalry in 307 BCE, but the change was swiftly adopted by the other states because cavalry had greater mobility over the terrain of China.
The First Emperor developed plans to fortify his northern border, to protect against the nomadic Mongols. The result was the initial construction of what later became the Great Wall of China, which was built by joining and strengthening the walls made by the feudal lords, which would be expanded and rebuilt multiple times by later dynasties, also in response to threats from the north. Another project built during King Qin Shi Huang's rule was the Terracotta army, intended to protect the emperor after his death. The Terracotta army was inconspicuous due to its underground location, and was not discovered until 1974.

## Attribution

"The Qin Dynasty: Government and Military" (Wikipedia) http://en.wikipedia.org/wiki/Qin_Dynasty#Government_and_military
# Spanish/Preterite

Verbs
The preterite verb form describes past actions that have begun or completed. The preterite sets something in the past as an event, with a beginning and an end. Spanish has another past tense form, the imperfect, that is used for past actions that are continuing, or for which its beginning or its end is not important.

## Conjugate regular verbs in the preterite

-AR verbs
Eliminate the "-ar" and replace it with one of the following endings:
-é
-aste
-ó
-amos
-asteis -aron
Patinar (to skate) becomes:
patiné: I skated
patinaste: you skated
patinó: he skated
patinamos: we skated
patinasteis: you skated patinaron: they skated
Notice that the "nosotros" form conjugates the same as it does in the present tense. This can cause confusion so look for context tools to make sure you have the right tense.
-ER and -IR verbs
Eliminate the "-er" or "-ir" and replace it with one of the following endings:
-í
-iste
-ió
-imos
-isteis -ieron
Vender (to sell) becomes:
vendí: I sold
vendiste: you sold
vendió: he sold
vendimos: we sold
vendisteis: you sold
vendieron: they sold

## Conjugate irregular verbs in the preterite

There are 2 types of irregular verbs in the preterite tense. We will start with the more regular of the 2.
The endings of these irregulars are all the same, which is why I am referring to them as more regular. The endings are: -e -iste -o -imos -isteis -ieron
The stems of these verbs also change as follows: estar --> estuv andar --> anduv tener --> tuv poder --> pud poner --> pus saber --> sup caber --> cup hacer --> hic (exception: 'hizo')
venir --> vin querer --> quis decir --> dij traer --> traj and any verb that ends in -ducir --> -duj
The more irregular verbs conjugate as follows: "Ir" and "Ser" fui fuiste fue fuimos fuisteis fueron
"Dar" di diste dio dimos disteis dieron
"Haber" hube hubiste hubo hubimos hubisteis hubieron
"Reír" reí reíste rió reímos reísteis rieron
"Leer" (similarly Creer) leí leíste leyó leímos leísteis leyeron
"Dormir" (similarly Morir) dormí dormiste durmió dormimos dormisteis durmieron
"Ver" vi viste vio vimos visteis vieron
# Spanish/Present Participle

Verbs
Running, jumping, skiing, thinking, talking, ...
Corriendo, brincando, esquiando, pensando, hablando ...
The present participle is formed by taking off the last two letters of a Spanish verb (-ar, -er, or -ir) and replacing it with -ando (-ar verbs) or -iendo (-er and -ir verbs).
Estar > estando
Comer > comiendo
Ser > siendo
Contar > contando
The slightly irregular ir > yendo
# Spanish/Pronouns

A pronoun is a type of word that refers to another noun, and can refer to different nouns depending on the context. In English we have pronouns, and Spanish does too. There are several types of pronouns that we will look at.
# Spanish/Pluperfect

Verbs
The pluperfect (el pluscuamperfecto de indicativo) is similar to the present perfect, but implies that an action had already occurred at a given time. For example:
    I had already bought a newspaper. Yo ya había comprado un periódico.
It is formed, similar to the present perfect, using the imperfect form of Haber with a past participle of the action verb. Había is the first-person imperfect form of Haber and comprado is the past participle of Comprar. It is often used with the adverb ya which means "already," indicating that the condition occurred in the past.
Examples:
    Tú ya habías mirado la película. You had already seen the movie.
    Ella ya había hecho las galletes. She had already made the cookies.
    Nosotros habíamos viajado a España. We had traveled to Spain.
    Vosotros habíais sacado fotos. You (plural, familiar) had taken picture.
    Ellos ya habían perdido el libro. They had already lost the book.

## Para cuando

The pluperfect is often used with clauses beginning in para cuando which means "by the time that." The verb following para cuando is conjugated in the present subjunctive form. For example:
    Ud. se había comido la merienda para cuando llegó al cine.
       You (singular, formal) had eaten the snack by the time that you arrived at the theatre.
    ¿Habías terminado la tarea para cuando tu amigo te llamó?
       Had you finished your homework by the time that your friend called you?
# Spanish/Present Progressive

Verbs
"He is running. They are dancing. I am liking ... "
The above are examples of the present progressive tense, which is used for continuous actions that are taking place right now. This tense works the same way in English and in Spanish.
Take the verb "to be" (estar) and conjugate it in the present tense, then add the present participle on the tail end.
Estoy caminando. I am walking.
Estamos jugando. We are playing.
Estas fingiendo. You are faking.
# Spanish/Poder

PODER: To be able to Future Irregular: Podr + Future Ending
(Yo) Podré: I will be able to.
Example: Yo podré luchar. I will be able to fight.
(Tu) Podrás: You will be able to.
Example: Tu podrás encontrar en el futuro. You will be able to understand in the future.
(Él,ella,usted) Podrá: He will be able to.
Example: Él podrá ganar el carrera. He will be able to win the race.
(Nosotros) Podremos: We will be able to. Example: Nosotros podremos sobrevivir en el bosque. We will be able to survive in the forest.
(Vosotros) Podréis: You all (Y'all) will be able to. Example: Vosotros podréis ver el loro en estos sillas. Y'all will be able to see the parrot in these chairs.
(Ellos,ellas,ustedes) Podrán: They will be able to. Example: Ustedes podrán estar comfortable aqui. They will be able to be comfortable here.