OpenLLM-France/wikimedia huggingface dataset:
# Programming Gambas from Zip/DidYouKnow
## Did You Know? — From Gambas ONE
### Shortcuts in Writing Code

Thanks to cogier, stevedee and jornmo on Gambas One. https://forum.Gambas.one/viewtopic.php?f=4&t=489
Double-click a blank area of the form to start typing code for the Public Sub Form_Open event. Double-click a button to start typing code for Public Sub Button_Click. Otherwise, right-click the object or form > click EVENT… > choose the event you want to write code for.

### Expansions

If you want to start writing a new sub, type ps<tab> and you will see already typed for you:
v<tab> is changed into Private $Var As Type
ds<tab>, df<tab> and di<tab> are changed into
Dim sVar As String
Dim fVar As Float
Dim iVar As Integer

### Help

If you hold down the CTRL key and click on a Gambas reserved word (e.g. Public, New, For, etc) the relevant help page is displayed. Selecting a keyword and pressing F2 also does it.
Right-click a tool in the toolbox and help will appear.

### Declaring Variables

In preferences (Ctrl-Alt-P) switch on Local variable declaration then in your empty 'Sub' type iCount = 6 and a Dim iCount as Integer automatically appears.

### Pausing and Looking at Variables

If the program is paused (you put in a “breakpoint” in a certain place in the code, and the execution reached this place, or you click the Pause button) you can select a variable (drag over it, or double-click it) and you will see its value.

### Widen, Shorten and Move Things

If you select the width or height properties of a control, the up or down arrows increase or reduce it by 7 pixels.
If you select the X property of a control, up-arrow moves right, down-arrow moves left by 7 pixels. Similarly in the Y property value box, up-arrow moves down and down-arrow moves up (work that one out) by 7 pixels.
If you want a line or selected lines of code to move up, click in the line and press Alt-UpArrow. Alt-DownArrow moves it or them down.

### Many Random Numbers

Dim siRand1, siRand2, siRand3, siRand4 As Short = Rand(0, 9)
This declares four short integer variables and puts a random digit between 0 and 9 into each.

### Deleting a Whole Line of Code

Press Shift-Delete anywhere on the line.

### Commenting and Uncommenting Lines of Code

Select the lines > Press Ctrl-K to “komment-out” the lines. Ctrl-U with lines selected will un-comment them. (Commenting out means making them into comments so they are not executed.)

### Non-Case-Sensitive Comparisons

Use a double equals sign to disregard case. For example, "Hello" == "HELLO" is true. "Hello" = "HELLO" is false.
You can also use a function to compare two strings String.Comp("Hello", "HELLO", gb.IgnoreCase) = 0 . String.Comp("Hello", "HELLO") <> 0 is true.
# Programming Gambas from Zip/DataTypes
## Data Types and Conversions
### Data Types

One byte is the amount of memory required to store a single character such as the letter “A” or the digit “1”. It is eight bits (1’s or 0’s, like little switches that are on or off, up or down). 8 bits = 1 byte. 4 bits = 1 nibble, but that one is not used much.
http://Gambaswiki.org/wiki/lang/type
| | Description and Limits | Default value | Size in memory |
| Boolean | True or false | FALSE | 1 byte |
| Byte | 0 to 255 | 0 | 1 byte |
| Short | -32,768 to +32,767 | 0 | 2 bytes |
| Integer | -2,147,483,648 to +2,147,483,647 | 0 | 4 bytes |
| Long | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | 0 | 8 bytes |
| Single | Single precision | 0.0 | 4 bytes |
| Float | Floating point or double precision | 0.0 | 8 bytes |
| Date | Date and time, each stored in an integer. | NULL | 8 bytes |
| String | A variable length string of characters. | NULL | 4 bytes on 32 bits systems, 8 bytes on 64 bits systems |
| Variant | Any datatype. | NULL | 12 bytes on 32 bits systems, 16 bytes on 64 bits systems |
| Object | Anonymous reference to any object. | NULL | 4 bytes on 32 bits systems, 8 bytes on 64 bits systems. |
| Pointer | A memory address. | 0 | 4 bytes on 32 bits systems, 8 bytes on 64 bits systems |

### Conversions

Some conversions are omitted. Many of these conversions are done automatically as required. For example, these are fine without explicitly having to write the functions:
| CBool | to a Boolean | An expression is false if it is A false boolean A zero number A zero length string A null date A null object CBool(0) is false CBool(1) is true CBool("Gambas") is true CBool("") is false CBool(Null) is false 0 → False; Anything else → True e.g. 6 is True; -4 is True; 3-(1+2) is False. |
| CDate | to a Date | CDate("09/06/1972 01:45:12") CDate(2484515) |
| CFloat or CFlt | to a Float | CFloat("+3.1416") Cfloat("1.0E+3") is 1000 |
| CInt or CInteger | to an Integer | CInt("17") is the number 17 CInt(True) is -1 CInt(Now) is 2490779 CInt(3.2) is 3 CInt(3.9) is 3 CInt(6) is 6 CInt(-7.2) is -7 CInt(-7.9) is -7 TRUE → -1 FALSE → 0 |
| CStr or CString | to a String | CStr(-1972) is -1972 CStr(Now) is 05/16/2002 15:08:31 CStr(Pi) is 3.14159265359 |
| Str | a number or a date into a string | The opposite of Val Use Format to have control of what form the number or date takes. |
| Val | a string into a number or a date | Conversion follows these steps until if finds something it can convert: Look for a date Look for a long Look for an integer Look for a true or false If none, return NULL. IsNull(Val("Gambas")) is True |
# Parasitic Insects, Mites and Ticks: Genera of Medical and Veterinary Importance
## Table of Contents

                               Introduction
                               Insects - general characters
                               Sucking Lice
                               Chewing Lice
                               Fleas
                               Mosquitoes, Midges, Sandflies and Blackflies
                               Horse-flies, Clegs and similar flies
                               House-flies, Stable-flies and similar flies
                               Blow-flies, Screw-worm flies and Flesh-flies
                               Bot-flies and Warble-flies
                               Louse flies and Keds
                               Blood-sucking bugs
                               Acarines - general characters
                               Surface feeding mites
                               Burrowing mites and endoparasitic mites
                               Mites of bird-nests, allergenic mites, and others
                               Soft ticks
                               Hard ticks
                               (End of book)
# Pulsars and neutron stars/Telescopes involved in pulsar research
## Radio telescopes
### Observatory setup

In this section we describe the Parkes observatory in detail.

#### Observatory time standard

The maser system at Parkes does not produce a signal such as a 1 second tick. Instead it produces an accurate 5 MHz waveform. This waveform is read by the clock system (known as the Australia Telescope Distributed Clock, ATDC). The actual day, month and year of that clock are set manually when the clock is started and continually updated with IERSA data.
# Pulsars and neutron stars/Statistical and analysis methods for pulsar research
## Introduction

Pulsar searching and timing requires the analysis of time series of data. In this section we present commonly used equations, algorithms, numerical methods, methodologies and routines.

## Basic time series analysis

We assume that we have a time series of $N$ samples. Each sample, $j$, has a time $t_{j}$ and its value $y_{j}$. The mean of the values (note that we are starting the element counter from zero):
${\bar {y_{j}}}={\frac {1}{N}}\sum _{j=0}^{N-1}y_{j}$
The standard deviation represents the amount of variation in a data set.
$\sigma ={\sqrt {{\frac {1}{N}}\sum _{j=0}^{N-1}(y_{i}-{\bar {y}})^{2}}}$
This can also be calculated using:
$\sigma ={\sqrt {\left({\frac {1}{N}}\sum _{j=0}^{N-1}x_{i}^{2}\right)-\left({\frac {1}{N}}\sum _{j=0}^{N-1}y_{i}\right)^{2}}}$

## Distributions
### $\chi ^{2}$-distribution

The $\chi ^{2}$-distribution is defined by the number of degrees of freedom, $k$. The mean of the distribution is $k$ and the variance $2k$. For a power-spectrum estimate the distribution of each point is given by a $\chi ^{2}$-distribution with 2 degrees-of-freedom (corresponding to an exponential distribution with the rate parameter $\lambda =0.5$):
$p(x)={\frac {1}{2}}e^{-x/2}.$
The mean of this is 2 and the variance is 4. It is common to normalise the distribution so that the mean=1. The normalised chisquare(2) has $p(x)=e^{-x}$ which has a mean=1 and variance=1. The 95% confidence limits are 0.025 and 3.67.

## Fourier transforms and power spectra
### The Discrete Fourier Transform (DFT)

For a regularly sampled time series of values $y_{j}$ of N data points, the discrete Fourier transform (DFT) is:
$F_{k}=\sum _{j=0}^{N-1}y_{j}\exp \left(-2\pi {\sqrt {-1}}jk/N\right)$
(Note that this is the definition that is used in the forward transform for the fftw libraries). Note that the $F_{k}$ values are complex:
$F_{k}=R_{k}+iI_{k}.$
Note that for pulsar searching it is common to normalise all the Fourier coefficients, $F_{k}$ by the factor (see Ransom et al. 2012)
$\gamma =(N{\bar {y_{j}^{2}}})^{1/2}$
# Pulsars and neutron stars/The Sun and interplanetary medium
## Introduction

The Sun significantly affects pulsar observations. It causes a delay in the pulse arrival times (the Shapiro delay) and increases the dispersion measure and rotation measure of a pulsar when the line-of-sight to the pulsar passes close to the Sun. The Sun and solar wind can therefore be studied through observations of pulsars, but also it needs to be accounted for when predicting pulse arrival times as part of the pulsar timing method.

### Carrington Rotation
## Modelling the solar wind

The simplest model, which is used in the standard pulsar timing software packages such as tempo and tempo2, is to assume that the solar wind is constant in time and spherically symmetric.
$DM_{\odot }{\rm {[cm}}^{-3}{\rm {{pc]}=4.85\times 10^{-6}n_{0}{\frac {\theta }{\sin \theta }}}}$
where $n_{0}$ is the electron density at 1 AU from the Sun (in cm$^{-3}$) and $\theta$ is the pulsar-Sun-observatory angle.
A review of solar wind physics is available from Schwenn (1996). It is usually approximated as having two parts. One part is quasi-static and co-rotates with the Sun. The second part is transient and has time scales of hours to days (such transient events include coronal mass ejections). You et al. (2007) showed how the quasi-static part could be modelled. This part is divided into two components: "fast" and "slow".

### The slow wind

The slow wind originates at low or middle solar latitudes. You et al. (2007) modelled the electron density in the slow wind as:
$n_{e}=2.99\times 10^{14}R_{\odot }^{-16}+1.5\times 10^{14}R_{\odot }^{-6}+4.1\times 10^{11}(R_{\odot }^{-2}+5.74R_{\odot }^{-2.7}){\rm {m}}^{-3}$
at a distance of $R_{\odot }$ solar radii.

### The fast wind

The fast wind originates in regions with open magnetic field geometry called "coronal holes". Guhathakurta & Fisher (1995, 1998) showed that the electron density in the fast wind is approximately
$n_{e}^{\rm {fast}}=1.155\times 10^{11}R_{\odot }^{-2}+32.3\times 10^{11}R_{\odot }^{4.39}+3254\times 10^{11}R_{\odot }^{-16.25}{\rm {m}}^{-3}$
at a distance of $R_{\odot }$ solar radii.
# Pulsars and neutron stars/Testing theories of gravity
## Introduction

Stairs (2003) provided an introduction to testing theories of gravity using pulsar observations. The search for gravitational wave (a prediction of general relativity and other theories of gravity) is discussed elsewhere. Here, we consider verifying the predictions of various theories of gravity and the possible violation of equivalence principles using binary pulsars. The majority of binary pulsar orbits are adequately described by the five Keplerian parameters:
* the orbital period, $P_{b}$
* the projected semi-major axis, $x$
* the eccentricity, $e$
* the longitude of periastron, $\omega$
* the epoch of periastron, $T_{0}$
However, in some cases significant residuals are still present are fitting for the Keplerian parameters. In such cases one or more post-Keplerian (PK) parameters are required in the timing model.

## Tests with double neutron-star binary systems

In general relativity the equations the post-Keplerian parameters can be written as:
${\dot {\omega }}=3\left({\frac {P_{b}}{2\pi }}\right)^{-5/3}(T_{\odot }M)^{2/3}(1-e^{2})^{-1}$
$\gamma =e\left({\frac {P_{b}}{2\pi }}\right)^{1/3}T_{\odot }^{2/3}M^{-4/3}m_{2}(m_{1}+2m_{2})$
${\dot {P_{b}}}=-{\frac {192\pi }{5}}\left({\frac {P_{b}}{2\pi }}\right)^{-5/3}\left(1+{\frac {73}{24}}e^{2}+{\frac {37}{96}}e^{4}\right)(1-e^{2})^{-7/2}T_{\odot }^{5/3}m_{1}m_{2}M^{-1/3}$
$r=T_{\odot }m_{2}$
$s=x\left({\frac {P_{b}}{2\pi }}\right)^{-2/3}T_{\odot }^{-1/3}M^{2/3}m_{2}^{-1}$
where $T_{\odot }=GM_{\odot }/c^{3}=4.925490947\mu s$, $s=\sin i$, $M=m_{1}+m_{2}$ where $m_{1}$ and $m_{2}$ are the masses of the pulsar and its companion. $i$ is the inclination angle of the orbit.
# Pulsars and neutron stars/The interstellar medium
## Introduction

The nature of the pulsed radiation observed on Earth is affected by charged particles in the interstellar medium (ISM).

## Dispersion

The radiation travels through the ionized gas of the ISM with group velocity (Shapiro & Teukolsky 1983):
$v(\nu )=c\left(1-{\frac {\nu _{e}^{2}}{\nu ^{2}}}\right)^{1/2}$
where $c$ is the vacuum speed of light and $\nu _{e}$ is the plasma frequency. The time difference, $\Delta T$ between two frequencies $\nu _{1}$ and $\nu _{2}$ after travelling a distance $d$ equals:
$\Delta T=\int _{0}^{d}\left({\frac {1}{v_{1}(l)}}-{\frac {1}{v_{2}(l)}}\right)dl$
where $v_{1}$ and $v_{2}$ are the group velocities corresponding to the two frequencies. Writing the plasma frequency in terms of fundamental constants and $n_{e}(l)$ the charged particle density we get:
$\Delta T\approx {\frac {e^{2}}{2c\pi m_{e}}}\left({\frac {1}{\nu _{1}^{2}}}-{\frac {1}{\nu _{2}^{2}}}\right)\int _{0}^{d}n_{e}(l)dl$
where $e$ is the electronic charge and $m_{e}$ is the electron rest mass. We define the pulsar's dispersion measure (DM) as
${\rm {DM}}=\int _{0}^{d}n_{e}(l)dl$
Hence, the time delay, $t$ between an observed pulse at observing frequency $\nu$ and a pulse of infinite frequency (or travelling through a vacuum) is given by:
$t[s]\approx 4.15\times 10^{3}{\frac {\rm {DM[{\rm {cm}}^{-3}{\rm {pc}}]}}{(\nu [{\rm {MHz}}])^{2}}}$
When a pulsar is observed with a frequency channel resolution of ($\Delta \nu$), the dispersion will lead to a smearing of the profile:
$\Delta t_{\rm {DM}}\approx 8.30\times 10^{6}{\rm {DM}}\Delta \nu \nu ^{-3}$ ms

### Dispersion measure variations
#### Structure function analysis
## Modelling the interstellar medium

Cordes & Lazio (2002) presented the most commonly used model for the Galactic distribution of free electrons.
# Perl Programming/Keywords/rand
## The rand keyword

rand is a function that returns a random fractional number greater than or equal to 0 and less than the value of EXPRESSION. Without EXPRESSION, the value 1 is used so that the interval of the random number is $[0,1)$.

### See also

* srand
# Perl Programming/Keywords/read
## The read keyword

read is a function that attempts to read LENGTH characters of data into variable SCALAR from the specified FILEHANDLE. If OFFSET is specified, it skips the number of OFFSET characters. It returns the number of characters actually read. If the end of file is reached, 0 is returned. On an error undef is returned and $! is also set.
read is unfortunately not the opposite of write.

### See also

* sysread
* write
# Perl Programming/Keywords/readdir
## The readdir keyword

readdir is a function that returns the next directory entry that was opened by opendir. If used in a list context, the function returns all the rest of the entries in the directory. If there are no more entries, it returns the undef value in scalar context and the empty list in list context.

### Syntax

| chdir | closedir | mkdir | opendir | readdir | rewinddir | rmdir | seekdir | telldir |
# Perl Programming/Keywords/qx
## The qx keyword

qx is a command that contains a string that may be interpolated. It is then executed as a system command with /bin/sh or similar. Wildcards, pipes, and redirections of the shell are taken into account. The collected standard output of the command is returned, and standard error remains unchanged. In scalar context, it comes back as a single string that may be multi-lined, or an undef, if the command failes. In list context, it returns a list of lines (however you've defined lines with $/ or $INPUT_RECORD_SEPARATOR), or an empty list, if the command failes.
# Perl Programming/Keywords/qq
## The qq keyword

The qq command that contains a double-quoted, interpolated string.
# Perl Programming/Keywords/qr
## The qr keyword

The qr command that contains a double-quoted, interpolated string, which is interpolated just as the command m. The returned value is a normalized version of the original pattern.
# Perl Programming/Keywords/quotemeta
## The quotemeta keyword

The quotemeta command returns the value of EXPRESSION such that all the ASCII non-"word" characters (that do not match with [A-Za-z_0-9]) are backslashed. This is the internal function implementing the \Q escape in double-quoted strings. If EXPRESSION is not passed, the function uses $_ instead.
# Perl Programming/Keywords/qw
## The qw keyword

qw is a command that can be used to replace the quotation mark (") symbol.
# Perl Programming/Keywords/readline
## The readline keyword

readline is a function that reads from the filehandle whose typeglob is contained in EXPRESSION. Without a parametre, it reads from *ARGV. If called in scalar context, it reads the file line-by-line until end-of-file is reached. After this, the function returns undef. If called in list context, it reads till end-of-file and returns a list of lines. (The definition of a line is given by $/ or $INPUT_RECORD_SEPARATOR).
# Perl Programming/Keywords/q
## The q keyword

The q command that contains a single-quoted, literal string. A backslash represents a backslash unless followed by the delimiter or another backslash. In this case, the delimiter or backslash is interpolated.
# Perl Programming/Keywords/wait
## The wait keyword

The function wait behaves like wait(2) on UNIX-like systems, returning the PID of the child process deceased, or -1, if there was none. The status of the process can be found in $? and ${^CHILD_ERROR_NATIVE}.
# Perl Programming/Keywords/waitpid
## The waitpid keyword

The function waitpid returns the PID of a particular child process when deceased, or -1, if there was not such a child process. Some systems indicate that there are still processes running with 0.
# Perl Programming/Keywords/wantarray
## The wantarray keyword

The function wantarray returns true, if eval or the context of the currently executing subroutine is looking for a list value, and returns false, if the context is looking for a scalar. wantarray returns the undef, if the context is looking for no value (void context).
The result of wantarray is unspecified in the top level of a file, in a wantarray, BEGIN, CHECK, INIT, END, or UNITCHECK block. The same is the case for the DESTROY method.
# Perl Programming/Keywords/untie
## The untie keyword

untie breaks the binding that has been created between an variable and a package (see tie).

### Syntax
## See also

* tie
# Perl Programming/Keywords/vec
## The vec keyword

The function vec treats the string in EXPRESSION as a bit vector with elements of width BITS and returns the value of the element specified by OFFSET as an unsigned integer. BITS must be a power of two from 1 to 32 (or 64, if the platform supports it).
If BITS is 8, the elements of the input string are bytes.
If BITS is 16 or more, bytes of the input string are grouped into chunks of size BITS/8. Each group is converted to a number as it is done with pack/unpack using the big-endian formats n /N (analogously for BITS==64).
If BITS is 4 or less, the string is broken into bytes, then the bits of each byte are broken into 8/BITS groups. Bits of a byte are numbered in a little-endian-ish way, as in 0x01, 0x02, 0x04, 0x08, 0x10 etc
vec may also be assigned to, in which case parentheses are needed to give the expression the correct precedence. See example below.
If the selected element is outside the string, 0 is returned. If an element off the end of the string is written to, Perl will first extend the string with sufficiently many zero bytes. Negative OFFSET is considered an error.
vec ignores the UTF-8 flag, if it happens that the string is encoded as UTF-8 internally, and it operates on the internal byte string.

### See also

* pack
* unpack
# Perl Programming/Keywords/until
## The until keyword

until is the statement that uses the EXPRESSION, called the condition, to loop until the condition is false. It is the opposite of the while statement.

### See also

* while
# Perl Programming/Keywords/warn
## The warn keyword

warn prints the LIST to STDERR. If the last LIST element is not a newline, it appends the same file/line number text as die does. If the output is empty and the variable $@ contains already a value, this is used after appending "\t...caught" to $@. If this variable is empty, the string "Warning: Something's wrong" is used.
If a $SIG{__WARN__} is installed, no message is printed. With the __WARN__ handler, all the warnings can be suppressed.
# Perl Programming/Keywords/use
## The use keyword

use imports some semantics into the current package from the named module, generally by aliasing certain subroutine or variable names into the calling package. It is exactly the same as
with the exception that Module must be a bareword.

### See also

* not
* require
# Perl Programming/Keywords/utime
## The utime keyword

utime modifies the access and modification times on each file of a list of files, where the first two elements of the list must be first the NUMERIC access and then the modification time.

### Syntax

| gmtime | localtime | time | times | utime |
# Perl Programming/Keywords/values
## The values keyword

values returns a list of all the values of the named HASH, when called in list context. Using Perl 5.12 or later, it will also return a list of the ARRAY. Older versions would produce a syntax error. If called in scalar context, values returns the number of values in the object.
A side effect is that any call on an ARRAY or a HASH will reset the internal iterator of the object. If called in void context resets only the iterator. In list context, values @array is the same as @array.
The values are returned as call-by-reference, so any modification to the elements would change the object content.
From Perl 5.14 onwards, values can evaluate an EXPRESSION that should have the reference to an unblessed hash.

### See also

* keys
# Materials Science/Materials/Polymers
## Polymers

Polymer is a group of substances that has large molecules consisting of at least five repeated chemical units bonded together with a same type of linkage, like beads on a string.Polymer usually contains more than five repeated units and some polymers contain hundreds or thousands of monomers in each of their polymer chains. Polymer materials can be natural or synthetic. Polymer material is a large group of materials whereby they can be further classified specifically into plastics, elastomers and composites!
Sections: 1. Polymer molecules - mers, chemistry, common polymers 2. Molecular weight 3. Molecular structure and configuration 4. Thermoplastics and thermosets 5. Crystallinity

## 1. Polymer molecules - mers, chemistry, common polymers
### 1a. Some Basic Terminology

Because polymers are so much larger than other molecules, they are often known as macromolecules.
A mer is a repeating unit that makes up a polymer. The term comes from the Greek word "Meros" meaning part. From this, the term polymer was created to mean many mers. The term "Monomer" is sometimes used to refer to the component molecules a polymer is created (synthesized) from.

## 2. Molecular Weight

The formula for molecular weight of a polymer is
M_n=[sigma]X_i M_i