OpenLLM-France/wikimedia huggingface dataset:
# Sensory Systems/Olfactory System/Sensory Organs

In vertebrates the main olfactory system detects odorants that are inhaled through the nose where they come to contact with the olfactory epithelium, which contains the olfactory receptors.
Olfactory sensitivity is directly proportional to the area in the nasal cavity near the septum reserved to the olfactory mucous membrane, which is the region where the olfactory receptor cells are located. The extent of this area is a specific between animals species. In dogs, for example, the sense of smell is highly developed and the area covered by this membrane is about 75 – 150 cm$^2$; these animals are called macrosmatic animals. Differently in humans the olfactory mucous membrane cover an area about 3 – 5 cm$^2$, thus they are known as microsmatic animals.
In humans there are about 10 million olfactory cells, each of which have 350 different receptor types composing the olfactory mucous membrane. The 350 different receptors are characteristic for only one odorant type. The bond with one odorant molecule starts a molecular chain reaction, which transforms the chemical perception into an electrical signal.
The electrical signal proceeds through the olfactory nerve’s axons to the olfactory bulbs. In this region there are between 1000 and 2000 glomerular cells which combine and interpret the potentials coming from different receptors. This way it is possible to unequivocally characterise e.g. the coffee aroma, which is composed by about 650 different odorants. Humans can distinguish between about 10.000 odors.
The signal then goes forth to the olfactory cortex where it will be recognized and compared with known odorants (i.e. olfactory memory) involving also an emotional response to the olfactory stimuli.
It is also interesting to note that the human genome has about 600 – 700 genes (~2% of the complete genome) specialized in characterizing the olfactory receptors, but only 350 are still used to build the olfactory system. This is a proof of the evolution change in the necessity of humans in using the olfaction.
# Ruby Code Examples

This page applies only to version 1.9.2 of Ruby on Win Intel x86 / Linux AMD64 Platforms.
This page illustrates the Ruby Code Examples, in a straight way than to lengthy explanations, this can be used like an immediate reference for both syntax and programming ideas. Concise methods attempting a problem with a pragmatic approach are also discussed.

## Basics
### Strings

String interpolation allows a variable to get replaced by its value while execution
%Q and %q are string literals that are with special properties
Multiline Strings are defined with '<<' prefix to a named delimiter, like
Ruby is really flexible with strings
The string delimiter pairs are '', "", but with %, %q and %Q prefix, we have //,, ##, as delimiters, the unofficial rule is to use the delimiter that is not used to declare the string itself, this is to declare raw strings to avoid delimiter collision

### Objects

An Object is something that can be handled with defined Methods, even for the physical objects arround us there are defined methods in using them, whenever we say 'object' it is to mean that it has some methods through which the object can be handled
Ruby is object oriented, everything is an object including numbers, strings and even the nil

### Enumerators, Ranges, Arrays and Hashes

Each of these can use the each method for iteration, though they seems to be synonyms, there is lot of difference in computing, The Enumerators and Ranges are almost of fixed memory length and so are memory efficient and fast, whereas Arrays and Hashes involves complex data structures for to be dynamic

#### Arrays

An array is a collection of elements, by default an array of n elements has its index enumerated from 0 to n-1, i.e, the index to the first element of an array is 0
array of arrays, array of ranges and arrays of mixed datatypes are allowed to declare, Object Oriented!

#### Hashes

Hash is an associative array which is a collections of Keys and it's associated Values
# Ruby Hacking Guide

The RHG is a book that explains how the ruby 1.7.x-1.8.x interpreter (the official C implementation of the Ruby language) works internally. The original book was based on the source code of ruby 1.7.3 so there are a few small differences to the current version of ruby. However, these differences may make the source code simpler to understand and the Ruby Hacking Guide is a good starting point before looking into the ruby source code. The version of the source code used can be downloaded here: http://i.loveruby.net/ja/rhg/ar/ruby-rhg.tar.gz.
This project is picking up from where Vincent Isambart and Clifford Escobar have left off , with the aim to translate the outstanding chapters to English to help Ruby hackers understand the internals of the MRI interpreter.
Note also the existence of this translation: http://hawthorne-press.com

## Table of Contents

* Preface
* Introduction

### Part 1: Objects

* Chapter 1: Ruby language minimum
* Chapter 2: Objects
* Chapter 3: Names and name tables
* Chapter 4: Classes and modules
* Chapter 5: Garbage collection
* Chapter 6: Variables and constants
* Chapter 7: Security

### Part 2: Syntax analysis

* Chapter 8: Ruby language details
* Chapter 9: Yacc crash course
* Chapter 10: Parser
* Chapter 11: Context-dependent scanner
* Chapter 12: Syntax tree construction

### Part 3: Evaluation

* Chapter 13: Structure of the evaluator
* Chapter 14: Context
* Chapter 15: Methods
* Chapter 16: Blocks
* Chapter 17: Dynamic evaluation

### Part 4: Around the evaluator

* Chapter 18: Loading
* Chapter 19: Threads
* Final chapter: Ruby's future
# Ruby Programming/Alternate quotes

← Strings | Here documents →
In Ruby, there's more than one way to quote a string literal. Much of this will look familiar to Perl programmers.
These alternative methods are:
* single quotes with the %q operator: %q(abc) is the same as 'abc'
* double quotes with the %Q operator: %Q(abc's) is the same as "abc's"

## Alternate single quotes

Let's say we are using single quotes to print out the following path.
This will result in the following output:
The single quotes keep the \b, \n, and \t from being treated as escape sequences (the same cannot be said for wikibooks' syntax highlighting).
Now let's consider the following string literal:
This outputs:
Escaping the apostrophes makes the code less readable and makes it less obvious what will print out.
Luckily, in Ruby, there's a better way. You can use the %q operator to apply single-quoting rules, and choose your own delimiter. This delimiter will mark the beginning and end of the string literal.
Each line will print out the same text:
You can use any punctuation you want as a delimiter, not just the ones listed in the example.
Of course, if your chosen delimiter appears inside of the string literal, then you need to escape it.
If you use matching braces to delimit the text, however, you can nest braces, without escaping them.

## Alternate double quotes

The %Q operator (notice the case of Q in %Q) allows you to create a string literal using double-quoting rules, but without using the double quote as a delimiter. It works much the same as the %q operator.
Just like double quotes, you can interpolate Ruby code inside of these string literals.
# C Extensions

Extending ruby with C extensions is relatively easy. The README.EXT file included with the source code for ruby is very useful and talks about creating extensions to ruby, converting ruby to c types and vice-versa.
Typically a C extension looks like
file go.c
Then you create a makefile for it by using the mkmf library.

#### Extension Config File

This file makes the makefile with the mkmf library. The makefile is then used with the make program to make the extension.
A simple config file looks like
file config.rb

## Process to Make an Extension

This is a short overview of a simple extension that prints the classic phrase "Hello!" You need to know C and read the README.EXT file if you want to create something more useful.
Create a new folder and add the two files below into it.
file hello.c
file config.rb
Now from the command prompt run the commands:
Now to test it. Type this to load the extension.
Type in "hello" and IRB will echo back.

## Differences between 1.9 and 1.8

1.9 has at least the difference of having more macros defined. Here's how to get them in 1.8 (some of this from Phusion passenger's code).

## C extensions in Jruby

You can use java extensions in jruby (obviously). You can also use ffi and/or ffi-inliner gem to use native C extensions.

## External Links

A tutorial.
# Scriptapedia/90-minute workshop sample

Sample of a 90 minute workshop
Title
Improving Inter-department Communication
Project Background
Inter-department communication has not been ideal in this institution. We want to improve communication between staff from different departments in order to improve collegiality and effectiveness.
Project Objectives (Explicit and Implicit)
Understand the structure and dynamics of communication in the Institution.
Improve communication between staff from different departments.
Aid the use of SD in solving social problems
Core Modeling Team
*insert names
Participants
Department representative
| Time | Activity | Description |
| | Discussion with project sponsor | Touching base to reiterate the framing of the problem. Restating the problem in a behavior over time graph. |
| 6:00-6:15 | Intro SD Intro/public agenda | A leads, S as Notetaker E as photographer A welcomes and thanks everyone for their presence. A to go through the public agenda for the next 90 minutes. A uses the example of the chicken and egg to show system dynamics convention: variables, arrows, polarity. Prompt: As there are more chickens, more chickens lay more eggs. As there are more eggs, more chickens are hatched. Therefore, chicken and eggs share a reinforcing relationship. However, due to overcrowding, chickens begin to cross the road, resulting in road kills. So as there are more chickens, there are also more chicken road kills which lead to less chickens. As such, chicken and chicken road kills form a balancing relationship. |
| 6:15-6:45 | Variable elicitation | J leads, E as wallbuilder, A as notetaker S as photographer J gives each participant sheets of paper and markers. J asks "What are the key variables affecting communication problems to organization X?" Collect variables after prioritizing. E places variables on a wall according to general themes, building the wall. |
| 6:45-6:50 | Break | To observe break if time permits. |
| 6:50-7:25 | Building a CLD with Paper | S leads, J as wallbuilder, E as note taker A as photographer With the question "What are the key variables affecting communication problems to organization X", a main variable forms the basis of the CLD formation. Referring to the variables on the wall, participants can contribute variables and S will clarify what the relationships are. J to model the relationships on the CLD as participants narrate. Prompts: "How does variable A relate to other variables on the wall?" "Are there any variables that may cause this (exogenous) variable to increase or decrease?" J to then explain the main feedback loops as they occur. S to clarify the relationships the various variables have and to encourage participants to see further links between the variables. |
| 7:25-7:30 | Closing comments | E facilitates, A as notetaker J as photographer E to describe the main takeaways to the group based on the system insights generated. |
# Scriptapedia/180-minute workshop sample

This workshop sample is based on a research project to apply community based group model building to the implementation of pediatric critical care in resource limited settings. The first day of workshops were conducted with two separate groups consisting of a group of hospital staff in leadership positions, and a second group of front line/ direct service staff in the pediatric care team. The second day of workshop included participants from both groups.

### Public Agenda - Day 1

| Activity | Outputs | Roles | Time |
| Welcome, Overview & Introductions | None | Meeting Convener – | 15 mins |
| Hopes & Fears (for the workshop) | Clusters of hopes and fears | Facilitator - Wall-builder – | 20 mins |
| Orientation to systems thinking | None | Presenter – | 30 mins |
| Presenting initial causal seed structure (based on workflow example) | None | Presenter – | 15 mins |
| Variable elicitation | List of variables | Facilitator – Wall-builder – | 40 min |
| Initiating and elaborating causal loop diagram | Causal Map | Facilitator – Modeler – | 55 mins |
| Closing | None | Facilitator – | 5 mins |
| Total | Total | Total | 3 hours |

### Public Agenda - Day 2 (Joint Workshop)

| Activity | Outputs | Roles | Time |
| Welcome and review of Day 1 | None | Reflector - | 15 mins |
| Presentation of synthesized qualitative model & review | List of main feedback loops and dynamics identified; List of insights gained from causal maps | Modeler – Reflector – Note-taker - | 40 mins |
| Presenting the concept model (simulating) | - | Presenter - | 15 mins |
| Causal mapping with concept model (different problem) | Causal map | Facilitator – Modeler – | 55 mins |
| Model Review | List of main feedback loops and dynamics identified; List of insights gained from new causal map | Modeler – Reflector - | 15 mins |
| Action ideas | List of action ideas | Facilitator – Wall-builder - | 30 mins |
| Dots (ranking) | Prioritized list of action ideas | Facilitator – | 10 mins |
| Reflection | List of key reflections/ insights gained by participants | Facilitator - | 20 mins |
| Next steps & closing | Immediate next steps/ action plan | Convener/ Closer – | 10 mins |
| Total | Total | Total | 3.5 hours |
# Scriptapedia/Acknowledgements

Scriptapedia is a collaborative effort to make group model building in system dynamics more transparent, accessible, and shared around the world. A number of individuals have been integral in initiating this effort. In alphabetical order, they are: David F. Andersen (University at Albany New York), Annaliese Calhoun (Washington University in St. Louis), Peter S. Hovmand (Washington University in St. Louis), Timothy Hower (Washington University in St. Louis), Etiënne Rouwette (Radboud University Nijmegen), Eric Steins (Kirwan Institute for the Study of Race and Ethnicity), George P. Richardson (University at Albany New York), and Krista Rux (Washington University in St. Louis).
Funding for Scriptapedia was initially provided by the Centers for Disease Control and Prevention through the Brown School Violence and Injury Prevention Center (1R49CE001510), National Institutes of Health (HHSN 276200900017C); and the Social System Design Lab at the Brown School of Social Work, Washington University in St. Louis.
# Set Theory/Review

Need help creating math symbols?

# Definitions
## Subset

$A\subseteq B$
* $\{x\mid x\in A{\hbox{ then }}x\in B\}$
Subset means for all x, if x is in A then x is also in B.

## Proper Subset

$A\subset B$
* $\{x\mid x\in A{\hbox{ then }}x\in B{\hbox{ and }}A\neq B\}$

## Union

$\bigcup A$
* $\{x\mid x\in \bigcup A{\hbox{ iff }}y\in A{\hbox{ s.t. }}x\in y\}$
$A\cup B$
* $\{x\mid x\in A{\hbox{ or }}x\in B\}$

## Intersection

$\bigcap A$
* $\{x\mid {\hbox{for all }}a\in A,x\in a\}$
$A\cap B$
* $\{x\mid x\in A{\hbox{ and }}x\in B\}$

## Empty Set

$\emptyset$
* ${\hbox{There is a set }}A{\hbox{ s.t. }}\{x\mid x\notin A\}$

## Minus

$A-B$
* $\{x\mid x\in A{\hbox{ and }}x\notin B\}$

## Powerset

${\mathcal {P}}(A)$
* $\{x\mid x\subseteq A\}$

## Ordered Pair

$\langle a,b\rangle$
* $\{\{a\},\{a,b\}\}$

## Cartesian Product

$A\times B$
* $A\times B=\{x\mid x=\langle a,b\rangle {\hbox{ for some }}a\in A{\hbox{ and some }}b\in B\}$
or
* $\{\langle a,b\rangle \mid a\in A{\hbox{ and }}b\in B\}$

## Relation

A set of ordered pairs

### Domain

$\{x\mid {\hbox{ for some }}y,\langle x,y\rangle \in R\}$

### Range

$\{y\mid {\hbox{ for some }}x,\langle x,y\rangle \in R\}$

### Field

${\hbox{dom}R{\hbox}}\cup {\hbox{ran}R{\hbox}}$

## Equivalence Relations

* Reflexive: A binary relation R on A is reflexive iff for all a in A, <a, a> in R
* Symmetric: A rel R is symmetric iff for all a, b if <a, b> in R then <b, a> R
* Transitive: A relation R is transitive iff for all a, b, and c if <a, b> in R and <b, c> in R then <a, c> in R

## Partial Ordering

* Transitive and,
* Irreflexive: for all a, <a, a> not in R

### Trichotomy

Exactly one of the following holds
* x < y
* x = y
* y < x

# Proof Strategies
## If, then

Prove if x then y
    Suppose x
    so, y

## If and only If

Prove x iff y
    suppose x
    so, y
    suppose y
    so, x

## Equality

Prove x = y
    show x subset y
    and
    show y subset x

## Non-Equality

Prove x != y
    x = {has p}
    y = {has p}
    a in x, but a not in y
# Set Theory/Special types of sets

Definition (cofinite):
Let $X$ be a set. A subset $A\subseteq X$ is called cofinite iff $X\setminus A$ is finite.
# Structural Biochemistry/The Pentose Phosphate Pathway
## Definition

As we all have known that cellular energy is inevitably important for metabolism of the body in all organisms, one important factor controlling all those metabolic pathways is enzymes. Most enzymes are proteins, which are synthesized by ribosomes in the cytoplasm. The precursor for protein synthesis are amino acids, which are obtains from the translation of RNA's, which come from the transcription of DNA. Therefore, DNA and RNA play major roles in metabolism. In order to synthesize DNA and RNA, there is one important precursor, which is Pentose Phosphate. There is a pathway which produces Pentose Phosphate and NADPH (which has a phosphate group at 2'-C of NADH instead of the hydroxyl group)

## The Pathway

The pathway has 6 steps:
* It starts with Glucose 6-Phosphate, Glu 6-P, which comes from other pathways, glycolysis for example.
* Instead of using the enzyme glucose 6-phosphate isomerase to isomerize the original reactant into fructose 6-phosphate for glycolysis, cells use another enzyme, glucose 6-phosphate dehydrogenase, and one important cofactor, NADP+, to oxidize the Glu 6-P into 6-phosphoglucono-δ-lactone with NADP+ being reduced to NADPH.
* Next, the enzyme lactonase hydrolyzes 6-phosphoglucono-δ-lactone into 6-phosphogluconate.
* In this step, cofactor NADP+ is used again as an oxidizing agent to oxidize 6-phosphogluconate to ribulose 5-phosphate in a reaction catalyzed by the enzyme 6-phosphogluconate dehydrogenase with the reduced NADPH as another product and the release of carbon dioxide.
* Note that in every step of the pathway, an addition of Magnesium cation helps stabilizing the reactions, which involves releases of electrons and protons.
* In a ketose-aldose reaction catalyzed by the enzyme phosphopentose isomerase, ribulose 5-phosphate is isomerized into ribose 5-phosphate, a precursor for later important reactions, such as DNA synthesis.

## Conclusion

The Pentose Phosphate pathway produces to important precursors for basic building blocks of life:
* The production of ribose for the synthesis of some cofactors, DNA, RNA.
* The production of NADPH for the synthesis of fatty acids, steroids, and other oxidation-reduction reactions (some occur in photosynthesis, especially in the Calvin cycle)
# Structural Biochemistry/The RNA recognition motif, a plastic RNA-binding platform to regulate post-transcriptional gene expression
## Overview

The RNA recognition motif (RRM) is one of the most common protein domains in eukaryotes and is also found to a lesser extent in bacteria and viruses. Structural aspects that allow for high RNA binding affinity and specificity include two conserved RNP motifs in the center of the β-sheet, two external β-strands, loops, and the C and N-termini.

## History

The RRM was first discovered in the late 1980s when it was observed that pre-mRNA and hnRNAs were always found in complex with proteins. Analysis of the mRNA PABP and hnRNP protein C showed a RNA-binding domain sequence of about 90 amino acids with eight conserved aromatic and positively charged residues. A second consensus sequence was subsequently discovered and these were called RNP 1 and RNP 2 and deemed necessary for binding RNA.

## Structure of the RRM and RNA Protein Complex

The RRM folds into a αβ structure with β1α1 β2 β 3α2 β4 with one four stranded antiparallel β-sheet and two alpha helices that are positioned against the sheet. More than 30 RRM structures have been determined by X-ray crystallography and NMR and these structures show a surprising amount of variation in the arrangement of the alpha helices and beta sheets.
An archetype example of RRM binding structure is the DNA-protein complex formed by hnRNPA1, which can bind both DNA and RNA. In this DNA-RNPA1 complex, two deoxynucleotides, A209 and G210 stack on aromatic rings located on beta 1 strands and cause rearrangement of the nucleic acid on the beta sheet in which the 5’ end is on the first half of the sheet and the 3’ is on the second half. A third aromatic residue interacts with hydrophobically with carbohydrate rings of A209 and G210 and a positively charged side chain of the RNP forms a salt bridge with the phosphate between A209 and G210.

## Affinity and Specificity

The RRM has high affinity and is highly specific. The two external beta strands play an important role in specificity. The beta sheet surface is not used in the same way for various RNA-protein complexes. In hnRNPA1 RRM1, each beta strand binds one nucleotide whereas in PABP RRM-1, nucleotides interact with beta 1 and 3 while the nucleotide in between interacts with the loop.
The N and C terminal regions enhance the RNA-binding affinity by increasing the protein-RNA interaction network. The base stacking on the aromatic residues mentioned earlier is sandwiched either by a protein side chain from the N-terminal region or the C-terminal region. The C terminus can also contribute to differentiating between DNA and RNA by interacting with the 2 ‘OH group of the sugar ring in a hydrogen bonding interaction.

## References

* The RNA recognition motif, a plastic RNA-binding platform to regulate post-transcriptional gene expression. Maris, Christophe. Dominguez, Cyril. Allain, Frederic H.-T. The FEBS Journal. April 21, 2005.<http://onlinelibrary.wiley.com/doi/10.1111/j.1742-4658.2005.04653.x/full>.
# Units of Measurement/Density

Density is the mass per unit volume of a substance. The formula for density is: D=m/v.
The unit for mass is kilograms (kg)/grams (g) and volume in centimetres cubed (cm$^3$) or metres cubed (m$^3$).
Example 1. A stone of mass 20 kg with volume 4 cm$^3$ calculate its density.
# Units of Measurement/Entropy

The SI unit for Entropy (S) is Joules per Kelvin (J/K). A more positive value of entropy means a reaction is more likely to happen spontaneously.
Atkins, Peter. Physical Chemistry. 9th. Oxford University Press, 2009. Print.
# Units of Measurement/Power

The SI unit for power is Watts(W). One Watt is equal to Joule per second (J/s) or kg*m^2s^-3. Power is equal to Work divided by seconds.
Young, Hugh. University Physics: With modern Physics. 12. Pearson College, 2007. Print.
# Units of Measurement/Energy

The SI unit for energy is Joules (J). One joule is equal to 1kg*m^2*s^-2. A kilo-joule (kJ) is equal to 1000 joules of energy. Calorie (Cal) is used to denote energy stored inside the food or energy used by the body. 1 Cal is equal to 4.184 Joules. Similarly, a kilo-calorie (KCal) is equal to 1000 calories.
Atkinds, Peter. Physical Chemistry. 9th. Oxford University Press, 2009. Print.
# Units of Measurement/Force

SI unit of Force is in Newtons (N). 1 Newton is equal to 1 kg*m*s^-2. The basic formula for force is F=ma where F stands for force, m stands for mass in kilograms and a stands for acceleration in m*s^-2. This is the Newton's second law of motion.
Atkinds, Peter. Physical Chemistry. 9th. Oxford University Press, 2009. Print.
# Units of Measurement/Frequency

Unit of measurement for frequency is Hertz (Hz). It describes number of cycles per seconds.