OpenLLM-France/wikimedia huggingface dataset:
# Signal Processing/Introduction
## What is Signal Processing?

The field of signal processing is a very important field of study and one that makes possible various other fields such as communications. MP3 music files contain processed, transformed, and compressed music signal data. Speech recognition systems such as dictation software need to analyze and process signal data to identify individual words in a spoken sentence. Neural interface devices, such as various medical prostheses must read the complicated signals of neurons, process those signals to determine the important features, and then convert those features to digital data. Signal processing enables high-speed data communication, even in the presence of interference or noise.

## Who is This Book For?

This book is intended for readers at the undergraduate and graduate college levels, specifically those studying electrical engineering or a related field. This book can be used to accompany several semesters of study, depending on how the material is divided and presented.

## What are the Prerequisites?

All readers should have significant prior knowledge of Signals and Systems, probability, Linear Algebra, and Calculus. Knowledge of linear algebra topics covered in Engineering Analysis, especially the sections about probability are required. Readers who do not have the necessary mathematics background will be at a severe disadvantage.

## What Will This Book Cover?

This book will take a look at the traditional problems and methods of signal processing. We will attempt to cover many analog processing techniques, but we also must cover many advanced digital techniques as well. The Digital Signal Processing book will lay many foundations about digital systems that will be used in this book. The reader is strongly encouraged to either read both these books simultaneously, or to read the beginning sections of Digital Signal Processing first before reading this book. That book will cover many topics that are specific to digital systems, while this book will attempt to cover techniques that are useful for either analog or digital, are hybrid in nature (that they have analog and digital components) or that are traditionally analog but that can be modified for fast digital computation.
This book will attempt to cover the concept of filtering specifically, including adaptive Weiner and Kalman filters. This book will also look at some offshoots of adaptive filter theory, including beamforming. The more advanced sections of this book will look at additional subject, such as nonlinear systems and wavelet analysis.
This book will not cover, and will not attempt to cover, prerequisite information that is already covered in the Signals and Systems book or any of the other prerequisites. This includes, but is not limited to:
* Integral or differential calculus
* Differential equations
* Digital systems and difference equations
* LTI systems theory
* Stochastic signals or processes
* Fourier transform and fourier series
# Signal Processing/Kalman Filtering

The Kalman filter keeps track of the estimated state of the system and the variance or uncertainty of the estimate. The estimate is updated using a state transition model and measurements. {\displaystyle {\hat {x}}_{k\mid k-1}} {\hat {x}}_{k\mid k-1} denotes the estimate of the system's state at time step k before the k-th measurement yk has been taken into account; {\displaystyle P_{k\mid k-1}} {\displaystyle P_{k\mid k-1}} is the corresponding uncertainty. Kalman filtering, also known as linear quadratic estimation (LQE), is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by estimating a joint probability distribution over the variables for each timeframe. The filter is named after Rudolf E. Kálmán, one of the primary developers of its theory.
The Kalman filter has numerous applications in technology. A common application is for guidance, navigation, and control of vehicles, particularly aircraft and spacecraft.[1] Furthermore, the Kalman filter is a widely applied concept in time series analysis used in fields such as signal processing and econometrics. Kalman filters also are one of the main topics in the field of robotic motion planning and control, and they are sometimes included in trajectory optimization. The Kalman filter also works for modeling the central nervous system's control of movement. Due to the time delay between issuing motor commands and receiving sensory feedback, use of the Kalman filter supports a realistic model for making estimates of the current state of the motor system and issuing updated commands.
The algorithm works in a two-step process. In the prediction step, the Kalman filter produces estimates of the current state variables, along with their uncertainties. Once the outcome of the next measurement (necessarily corrupted with some amount of error, including random noise) is observed, these estimates are updated using a weighted average, with more weight being given to estimates with higher certainty. The algorithm is recursive. It can run in real time, using only the present input measurements and the previously calculated state and its uncertainty matrix; no additional past information is required.
Using a Kalman filter does not assume that the errors are Gaussian.[3] However, the filter yields the exact conditional probability estimate in the special case that all errors are Gaussian.
Extensions and generalizations to the method have also been developed, such as the extended Kalman filter and the unscented Kalman filter which work on nonlinear systems. The underlying model is similar to a hidden Markov model except that the state space of the latent variables is continuous and all latent and observed variables have Gaussian distributions.

## References

* Kalman filter on Wikipedia
# Using SPSS and PASW/Opening a dataset
## Opening an Existing SPSS Data File

This chapter will explain how to open new and already saved data sets. Once you have SPSS open (see Chapter 2), click "File" → "Open" → “Data”:
After clicking the Data icon, SPSS will pull up a screen called “Open Data.” Open Data will give you option to find your data set. This can be seen in the screen shot below:
Browse through your directories until you find your data set, then select it and click “Open.” Your data set should now be open:

## Opening a New Data Window

If you'd rather enter data into a blank data file, you can create an empty SPSS data file. To do so, once you've opened the program, click "File" → "New" → "Data"
The result will be a blank or empty data file. You can enter data in the Data View (Chapter 4) and set variable characteristics in Variable View (Chapter 5).
Chapter contributed by Jennifer Gadarowski
# Using SPSS and PASW/Moving Variables

It is sometimes the case that you have a large dataset and you want to move variables to different locations in the dataset. In SPSS, you can do this by dragging and dropping the variables. However, in a very large dataset, that can take a long time. A much easier approach is to use syntax. Syntax allows you to move a variable to a specific location in the dataset relatively quickly. Below are some examples of the syntax you would use to move variables to various locations.

## Moving a Variable from the Bottom (or End) of a Dataset to the Top (or Beginning)

When you create new variables through recoding or by computing a variable, the variable is always created at the bottom or end of the dataset. To move a variable from the bottom of the dataset to the top, you can use the following syntax:
Where "bottomvariable" is the very last variable in your dataset, the "topvariable" is the very first variable in your dataset, and "secondtobottomvariable" is the variable just above the last variable. This syntax will move the "bottomvariable" variable to the very top of the dataset.

## Moving a Variable from a Specific Position to the Bottom (or End) of a Dataset

If you wanted to move a variable that is in the middle of the dataset to the bottom, you could use this syntax:
Where "variable15" is the variable you want to use and it is the 15th variable in the dataset. The syntax tells SPSS to keep variables 1 through 14 where they are, as well as variables 16 through 36. However, it tells SPSS to move variable 15 to the end of the dataset.
# Using SPSS and PASW/Recoding Variables

This page shows how to facilitate statistical analysis by creating new SPSS variables via recoding, i.e., remapping values from existing variables.
Let's say you want to combine or “collapse” categories because the number of responses in one category is too small for statistical analysis.
Instead of having ages range from 1-100 and having 100 options as it does when on a ratio scale of measure, you could recode age into ordinal variable ageCategory that has just three values: 29 and under, 30-60, and 61+.
When recoding variables, it is generally a good idea to first write the desired mappings between the values of the old and new variables, as illustrated in the table below.
Here, a variable measuring frequency of religious attendance is used to demonstrate the technique:
| Old Codes | New Codes |
| 0=never | 1=never to infrequently |
| 1=less than once a year | 1=never to infrequently |
| 2=about once or twice a year | 1=never to infrequently |
| 3= several times a year | 1=never to infrequently |
| 4=about once a month | 2=relatively frequently |
| 5=two to three times a month | 2=relatively frequently |
| 6=nearly every week | 2=relatively frequently |
| 7=every week | 2=relatively frequently |
| 8= several times a week | 2=relatively frequently |
| 9=no answer | 9=no answer |
It is time to actually perform our recode. Drop the “Transform” menu at the top of data editor window:
Click on “Recode into Different Variables”, as choosing the “Recode into Same Variable” would destroy the values of the existing variable. (The only time you'd use that is when fixing fouled labels.)
You will now see the “Recode into Different Variables” window. Choose the source variable from the list on the left and click the arrow (which then points left) to insert the variable into the “Numeric Variable → Output Variable” box. In this example, variable "attend" is selected for recoding:
Now type the new variable name and label in the “Output Variable” box and click Change.
Now click “Old and New Values.” You'll get the following window:
For each row of our table at top, enter Old Values on the left, New Values on the right and click “Add”. That will put them into the “Old → New” list.
As you can see, our screenshot shows original values 0 through 3 have been recoded as “1.” Values 4 through 8 have been recoded as “2” in the new variable. These recodings could have also been specified as ranges, by selecting the radio button next to “Range” and entering a range of source values.
When you are finished, click “Continue” and “OK.”
That will return you to the Data Editor window. In the Data View, drag the new variable from the very last column down and left until it is next to the column it recodes.
You might expect this to be done for you but the final step is to click the Variable View tab, and in the new variable's Values cell, edit the Value Labels to reflect the newly recoded values:
Click “OK” and you’re done.
Chapter contributed by Megan Hauf.
# VHDL for FPGA Design/Multiplexer
## Video Links

* Video of Simulation
* Video of how to get to the Multiplexer RTL Schematic
# VHDL for FPGA Design/Decoder
## Link to Video of ISE Navigation to RTL Schematic

Video of how to get to the Decoder RTL Schematic (circuit diagram) in the Xilinx ISE Project Navigator

## See Also

* Encoders-Decoders
# Transport
## 802.11a Wi-Fi
## ZigBee

ZigBee does not incorporate electric power lines into its technology therefore it is all wireless. ZigBee is very efficient, it can send up to 128 kilobits at a range of 250 feet. It is expected to be seen every from smoke detectors in your house to medical sensing devices. The best part is that it can function for a long time, on inexpensive batteries. Z-Wave also consists solely of wireless technology which is power efficient. It can send about 127 kilobits per second to a range of 100 feet. When you compare you would notice that Z-Wave and Insteon are very much similar. The only difference is that Insteon used electric power cables and Z-Wave doesn't.

## Others

proprietary microwave

## References

* ↑ "Improving Fairness in Multi-Hop Mesh Networks Using 802.11e" (PDF).
# Sociological Theory/Social Learning Theory
## Theory

Observational learning or social learning refers to learning that occurs as a function of observing, retaining and replicating behaviour observed in others. It is most associated with the work of psychologist Albert Bandura, who implemented some of the seminal studies in the area and initiated social learning theory.
Although observational learning can take place at any stage in life, it is thought to be particularly important during childhood, particularly as authority becomes important.
Because of this, social learning theory has influenced debates on the effect of television violence and parental role models. Bandura's Bobo doll experiment is widely cited in psychology as a demonstration of observational learning and demonstrated that children are more likely to engage in violent play with a life size rebounding doll after watching an adult do the same.
Observational learning allows for learning without any change in behaviour and has therefore been used as an argument against strict behaviourism which argued that behaviour change must occur for new behaviours to be acquired.

### Required conditions

Bandura called the process of social learning modelling and gave four conditions required for a person to successfully model the behaviour of someone else:
* Attention to the model
    A person must first pay attention to a person engaging in a certain behaviour (the model).
* Retention of details
    Once attending to the observed behaviour, the observer must be able to effectively remember what the model has done.
He talked a lot about sponge cake
* Motor reproduction
    The observer must be able to replicate the behaviour being observed. For example, juggling cannot be effectively learned by observing a model juggler if the observer does not already have the ability to perform the component actions (throwing and catching a ball).
* Motivation and Opportunity
    The observer must be motivated to carry out the action they have observed and remembered, and must have the opportunity to do so. For example, a suitably skilled person must want to replicate the behaviour of a model juggler, and needs to have an appropriate number of items to juggle to hand.

### Effect on behaviour

Social learning may effect behaviour in the follow ways:
* Teaches new behaviours
* Increases or decreases the frequency of which previously learnt behaviours are carried out
* Can encourage previously forbidden behaviours
* Can increase or decrease similar behaviours. For example, observing a model excelling in piano playing may encourage an observer to excel in playing the saxophone.

## References

* w:Albert Bandura
* w:Bobo doll experiment
* w:learning
* w:social cognition
* w:inference
* Bandura, Albert, Ross, Dorothea, & Ross, Sheila A. (1961). Transmission of aggressions through imitation of aggressive models. Journal of Abnormal and Social Psychology, 63, 575-582 Full text
* Bandura, A. (1977) Social Learning Theory. New Jersey: Prentice Hall. Hardback: ISBN 0138167443 - Paperback: ISBN 0138167516
# Sociology of Religion
## Table of contents

* Introduction
* Defining Religion
* The Sources of Religion
* Religious Typologies
* World Religions
* Non-World Religions
* Measuring Religiosity
* Religious Conversion
* Religion and Gender
* Religion and Race
* Religion and Class
* Religion and Politics
* Religion and Health
* Fundamentalism
* Religion and Violence
* Secularization
* The Future of Religion

### Additional topics

* The Psychology of Religion
* The Social Psychology of Religion
# Sociology of Religion/Fundamentalism

Religious fundamentalism first appeared in the late 19th century in the USA. At that time, some of the more liberal protestants attempted to adapt their views to the modern world, while other, more conservative protestants, opposed this. They stood behind the belief that the Bible must be understood literally. They created a set of pamphlets named The Fundamentals.
We place all conservative doctrines, movements and groups which oppose the modern society, a modern way of life and science under fundamentalism. They differ from each other by the reason of their creation, their goals and the ways with which to achieve them (violence, conversation, bribery).
All of the above share some common points:
* religious texts are perfect, without mistakes or misinterpretations - they must be read literally
* they deny religious pluralism
* modern society is fraught with negative influences (a society of consumers, hedonism and moral plurality)
* they have firm beliefs in connection with their religion
* opposition to feminism, homosexuals, abortion and birth regulation movements
* their religion should become the foundation for the life of the society and each individual
* all who disagree with their beliefs are considered enemies
# Sociology of Religion/Religion and Gender
## Ordaining Women

See Chaves, Mark. 1997. Ordaining Women.
# XQuery/Histogram of File Sizes
## Motivation

You have a large number of files in one or more collections and you want to generate a histogram chart that shows the relative distribution of the number of files in each size range.

## Method

We will use the xmldb:size function to generate a list of all the file sizes in a given collection. We can then transform this list into a series of strings that can be passed to the Google Charts line chart function.
The format of the size function is the following:
This function returns the number of bytes in a file.
Our first step is to create a sequence of numbers that represents all of the sizes of resources in a collection:
This can also be done with a combination of the collection function and the util:document-name function:

## Sample Result

http://chart.apis.google.com/chart?cht=ls&chs=500x500&chco=0000FF&chd=t:83,6,13,37,85,414,500,87,41,31,11,16,9,12,5,7,4,4,3,1,1

## Discussion

To run the query you will need to customized the name of the collection that you are analyzing. After you run the query you can check to make sure the results are what you expect and then copy the results into a browser URL.
Note that if there are files over the max size indicated in the top range, an additional count of these file sizes should be added.
This query could also be parametrized using the get-parameter function so that many of the parameters that are passed to the Google chart can also be set as a parameter in the XQuery of the URL.
# XQuery/Incremental Searching
## Motivation

You have a large data set and you want to use JavaScript to asynchronously communicate with a server to narrow the scope of the search as a user types.

## US Zip Code Example

There are around 43,000 5 digit ZipCodes in the US. There are a number of applications to convert a zip code to a location, for example Ben Fry's Java applet written using Processing
This example uses a client-side XHTML page using Ajax to request a subset of codes from a server-side search of an XML database of Zipcodes, updating the page dynamically.

### The HTML page

Generated by an XQuery although the content is static.

### Javascript

Uses XMLHttpRequest to request the subset and innerHTML to update the page.

### XQuery search

The Server-side XQuery to perform the search in the XML database and generate the XHTML. This uses the eXist full text index and the exist-specific &= operator.

### XML data file

The data was originally a CSV file, converted to XML using Excel and the XML add-in. This is a sample of the data.
Execute
# Background

Git has many features for managing data when many users are changing files around the world. Git has tools for seeing who has changed what data and how to view the differences. These features are not available in eXist (yet). However their is no standard REST interface for git.

# Installing eXgit

Note: this is a work in progress. Not done! We hope to have a packaging tool and a simple to install .xar file in the future.
The software for eXgit is stored on github here:
This software depends on the Git Java library here:
You will need to build this project but the ONLY jar you need is:
To build this I downloaded the zip file from github and did "mvn install". I did get errors so I had to do Mavin build with no tests:
Once you have both the jar files you can put them into $EXIST/lib/user
You can now build the "xar file:
This will put a build/eXgit-0.2.2.xar (about 1.6MB with the two jar files)
You can then load this into your eXist dashboard.
Note, for some reason the jar files are not working. We removed the reference to them in exist.xml and the build file and just manually copied them into the $EXIST_HOME/lib/user area.
Note that now the .xar file is about 2K!

# Testing Installation

You must have a local git checkout.
Use this as your import statement:

## Sample XUnit Test

To test this you can clone any git repository. For example the following will make a copy of the eXide project in /db/exide.
After this test runs you will notice that a .git file has been created in /db/exide/.git with all the git administrative files

# References

* eXgit on GitHub
* Eclipse Git on GitHub
# XQuery/Incremental Search of the Chemical Elements
## Introduction

In this example of AJAX in its AHAH form, an incremental search of the chemical elements is implemented. This is also an example of the use of matching with a regular expression.
The raw data is taken from a file provided by Elliotte Rusty Harold.

## Execution

Search the Elements

## The main page

The main page is a simple HTML file. The div element with id list is where the generated contents will be placed. The JavaScript function getList is called when any of several interface events occur.

## The JavaScript

The JavaScript implements the simple functionality of calling the server-side script getElement.xq with the string entered in the search box, and in the callback, pasting the returned XHTML into the div. [ This JavaScript uses no supporting libraries although it would be simplified by using e.g. jQuery ]

## The server-side search

This script is called by the getlist function when a partial atom name has been entered. The string is converted to a simple regular expression and used in the eXist free text matching function to retrieve matching atoms. The response depends on the number of matches found:
* if only one match, return a table of details
* if more than one match, return with a list of matches
* if none return "no matches"
A function turns the ATOM node into a table,mapping each child node to a row with the node name as the legend.

## To do

Some naming problems here - needs tidying. Units need to be included