OpenLLM-France/wikimedia huggingface dataset:
# Social Knowledge Creation/Spatial Humanities

Spatial Humanities and Digital Mapping primarily focuses on the practices of present day spatial humanities research following the shift to a computational mode of knowledge production and dissemination through digital mapping. This focal shift has resulted in an expanding social element in many branches of the field and often involves working with large corpora made possible through the automatization of geoparsing. One way in which the social element is integrated into the field is through the active participation of users who collect live geospatial data on GPS-based devices and update them onto a map, such as the OpenStreetMap community-driven environment. Another major constituent of digital spatial humanities is the availability of large general and field-specific open gazetteers with geospatial information and other details about the location that vary depending on the gazetteer. Many of these gazetteers consist of thousands of entries and are continuously expanding through user contribution. The open availability of geospatial information circumvents the widespread commercialization of geospatial information and is aligned with open access values. Rather than focusing on digital mapping tools, the entries in this section survey theoretical discourses in the field, features of digital mapping, and successful social mapping initiatives.

## Bibliography

* Google Maps APIs. Google Developers. 14 October 2015. Web. https://developers.google.com/maps/
* GeoNames. GeoNames. n.d. Web. http://geonames.org/
* Gregory, Derek. Geographical Imaginations. Oxford: Blackwell, 1994. Print.
* Guldi, Jo and Chris Johnson-Roberson. Paper Machines. metaLAB @ Harvard. n. d. Web. http://papermachines.org/
* Elliott, Tom and Sean Gillies. Pleiades. Pleiades. 21 May 2015. Web. http://pleiades.stoa.org/
* Jenstad, Janelle, and Kim McLean-Fiander. “The MoEML Gazetteer of Early Modern London.” The Map of Early Modern London. Ed. Janelle Jenstad. Victoria: University of Victoria. Web. https://mapoflondon.uvic.ca/gazetteer_about.htm
* Moretti, Franco. Atlas of the European Novel, 1800-1900. London: Verso, 1998. Print.
* OpenStreetMap. OpenStreetMap Foundation. n.d. Web. https://www.openstreetmap.org
* Tally, Robert. Spatiality. New York: Routledge, 2013. Print.
* Stanford Natural Language Processing Group. n.d. Web. http://nlp.stanford.edu/
* Unlock. Edina. n.d. Web. http://edina.ac.uk/unlock/places/
* Westphal, Bertrand. Geocriticism: Real and Ficitonal Spaces. Trans. Robert Tally. New York: Palgrave Macmillan, 2011. Print.
# Social Media for Business

Social Media has become an important area for business. Examples of social media objectives for companies are:
* Market Research (through monitoring of social media content)
* Building brand awareness and brand image
* Reduction of costs (e.g. through viral marketing)
* Targeting (i.e. spreading information only to relevant consumers, rather than to the masses)
* Recruiting
* Brand loyalty

## Social Media Marketing

When businesses use social media, this is often termed as Social Media Marketing. Social Media Marketing is defined as “an interdisciplinary and cross-functional concept that uses social media (often in combination with other communications channels) to achieve organizational goals by creating value for stakeholders.” Organizations can address several stakeholder groups through social media marketing. Examples include (potential) customers, journalists, bloggers, (potential) employees, and the general public. Strategic social media marketing also incorporates the management of the implementation, scope (e.g. more active or passive use), governance (e.g. social media guidelines or social media policies), and the establishment of a firm’s desired social media culture (e.g. top management support). This requires marketers to incorporate user-generated content into their managerial practice.

## References

* ↑ Felix, Reto; Rauschnabel, Philipp A.; Hinsch, Chris (2017). "Elements of strategic social media marketing: A holistic framework". Journal of Business Research. 70: 118–26. doi:10.1016/j.jbusres.2016.05.001.
* ↑ Filieri, Raffaele (2015). "What makes online reviews helpful? A diagnosticity-adoption framework to explain informational and normative influences in e-WOM". Journal of Business Research. 68 (6): 1261–70. doi:10.1016/j.jbusres.2014.11.006.
# Social Psychology
## Status

* Currently, this book consists of partly-written and largely separate components, some of which are copied/adapted from Wikipedia articles, etc.
* Potential contributors should feel to dive in and start editing, particularly if they are knowledgable.

## Front Matter

* Noted Contributors

## Introduction

    01. Introduction
    02. Research Methods

## Social Self

    03. Action and Person
    04. The Social Mind
    05. Personality, Self, and Identity

## Interaction

    06. Interaction
    07. Types of Social Action
    08. Relationships

## Collectives

    09. Collective and Mind
    10. Group Dynamics
    11. Crowd Behaviors

## Applied Social Psychology

    12. Applications to Sociology
# Social Psychology/Action and person

To many theorists, the locus of interest lies in actors, actions, and interactions between persons. But before any research can be done on those issues, the basic points of discussion that are involved in the above topics need to be laid out. In other words, it must first be asked, "What is a human action?"
The American sociologist Talcott Parsons created a model of human action which stressed that the most basic interesting event to recognize is goal-directed action. It was further refined by his student Robert K. Merton. In this model, human actions are made up of and involve:
* The actor or agent performing an action (including their intentions, schemas, knowledge, motives, and identity);
* The goal, or a future state of affairs that is desired (which may be a means to another end or an end in itself; involve human communicative action or be an object-oriented action; and be either a creative goal or reaction to a dilemma);
* The situation in which action is located, including both:
** The conditions of action (the things about a situation that the actor cannot influence or change). This includes such things as the normative background (or the relevant norms), the obstacles in the way of achieving the goal, and the human ecology of the setting.
** The means of action (which the actor has some degree of control over).
Though immediately intuitive and common-sensical, this model is useful as a preliminary guide by which research can be structured. (In semantics, the analytical tool of thematic roles bears many of the same characteristics. This sort of model is one concern in action theory.)
On its own, the above model describes all voluntary human action. However, social psychologists are more interested in describing a narrower subject matter: namely, social actions and aggregate actions. A "social action" was defined by Max Weber as any action that "takes account of the behaviour of others and is thereby orientated in its course"; that is to say, another person may be involved in the means, goal, or context of action (1947). Broader still, social psychologists may be interested in aggregate action, when there are multiple actors attempting to achieve the same ends independently of one another.
Of parallel interest at this level of analysis are the issues involved in socialization. What are the forces that cause people to learn their social roles? What are the mental processes that produce a socialized person? What is the role of biology in determining a person's development?
# Social Media

A reference text for people interested in learning about social media.
This wikibook is to be developed with students studying the Social Media course on Wikiversity, which is to be run by the University of Canberra in 2011

## Contents

* Introduction
* What is social media?
* How social media works?
* How social networks work
* How blogs work
* How forums work
* How wikis work
* How podcasts work
* How micro-blogging works
* Social media for business
* For Sports
* For Education
# TeX/day
## Description

\day is a parameter that TeX initiates to the day of the month. It may be changed to any integer <integer> with either of two equivalent forms above.

## Examples

Recall that the command \number will typeset the decimal representation of whatever follows it, and so if todays date is the 30th then
will typeset 30, if the \day parameter has not be redefined.
will typeset -45.
# TeX/deadcycles
## Description

Counts the number of consecutive invocations of the output routine with no \shipout command. Used to avoid endless loops. See also \maxdeadcycles.
# TeX/csname
## Description

Used with \endcsname. The text between the two commands build the name of a TeX command.
# TeX/dash

marks all possible hyphenation points in a word. Example : Wi\-ki\-pe\-dia
# TeX/defaulthyphenchar
## Description

Initializes the default hyphenation character, defined with \hyphenchar at the beginning of a \font command.
# TeX/crcr
## Description

Generates a \cr if no \cr is following. Usually used in macros.

## See also

* cr
# TeX/definition/control word

It is a set of letters that are preceded by an escape character, usually the backslash character. This occurs when macros (commands) are defined. The letters that give the command its name constitute the control word.
# TeX/def
## Synopsis

\def <command> <parameter-text>{<replacement-text>}

## Description

\def allows you to define new macros. The command must begin with an escape character (category code 0) and be composed of a series of letters (category code 11) or one single non-letter, following the escape character. (For instance \delta or \{.) Alternatively, <command> can be an active character (category code 13). Then, the parameter text tells TeX the valid syntax of the command being defined; furthermore, in the parameter text, one can include arguments (denoted by #1, etc., up to #9) which can be reused in the replacement text. For example, in
The first argument must be delimited by two square brackets while the second may be a single character (strictly speaking, a single token having a category code distinct from 1 or 2) or any balanced text surrounded by braces {...}. Finally, the replacement text tells TeX what the command is supposed to expand to and how to deal with the arguments if any (see example above).
Note that there should not be any space after parameter text. You can use % character if your command definition takes up multiple lines, for example
Contrarily to LaTeX (with \newcommand), TeX doesn't check whether the command to be defined is important or not. You might well say \def \def etc., except that the most probable is that you encounter some problems quite quickly. One way to be safe in this respect is to write
\def can be preceded by \global (the redefinition isn't confined to the current group, also controlled by \globaldefs), \long (the command admits long arguments), \outer (the command is not tolerated in parts of the code which are read at high speed).
See also the commands \let, \edef, \xdef.

## Examples

This defines a simple shortcut:
This defines a quotation environment
A small tester with: \def with one argument, and \def with two arguments - that can be run without typesetting (e.g. can be pasted in pdflatex shell ($_{\end{document}isleftout,sotheshellremainsopenafteritexecutesthepastedcode}$)):
# TeX/definition/badness

Badness is an integer from 0 to 10000 that is a measure of the quality of the spacing in any given box.
# TeX/definition/control sequence
## Description

A control sequence in TeX starts with an escape character, which is usually mapped to the backslash character '\'. This is either followed by letters to form a control word, or by a single non-letter to form a control symbol. Control words are terminated by a non-letter, if this happens to be a space character then it is not used to effect the spacing of the document.

## Examples

will end a paragraph. This is equivalent to a blank line to TeX.
will typeset an acute accent over an e followed directly by a grave accent over an a: éà
# Ruby on Rails/ActiveRecord/Callbacks
## Callbacks

Callbacks provide a means of hooking into an ActiveRecord object's lifecycle.

### Implementing Callbacks

There are four types of callbacks accepted by the callback macros:
* Method references (symbol)
* Callback objects
* Inline methods (using a proc)
* Inline eval methods (using a string) - deprecated.
Method references and callback objects are the recommended approaches, inline methods using a proc are sometimes appropriate (such as for creating mix-ins) and inline eval methods are deprecated.

#### Method Reference

The method reference callbacks work by specifying a protected or private method available in the object, like this:

#### Callback Objects

The callback objects have methods named after the callback, called with the record as the only parameter such as:
So you specify the object you want messaged on a given callback. When that callback is triggered the object has a method by the name of the callback messaged.

#### Proc

Example of using a Proc for a callback:

#### Inline Eval

The callback macros usually accept a symbol for the method they’re supposed to run, but you can also pass a "method string" which will then be evaluated within the binding of the callback. Example:
Notice that single plings (’) are used so the #{id} part isn’t evaluated until the callback is triggered. Also note that these inline callbacks can be stacked just like the regular ones:

### Callback Reference
#### before_save

This method is called before an ActiveRecord object is saved.

#### after_save

Once the active record object saved some method will be fired in that scenario we have to use the after_save callback.

#### before_create

called before creating a new object of the model

#### after_create

Called after creating new object and just before saving the records

#### after_destroy
### Partially Documented Callbacks

The following callbacks are partially documented. Their use is discouraged because of performance issues.

#### after_find

The after_find callback is only executed if there is an explicit implementation in the model class. It will be called for each object returned from a find, and thus can potentially affect performance as noted in the Rails API Documentation.

#### after_initialize

The after_initialize method is only executed if there is an explicit implementation in the model class. It will be called whenever an ActiveRecord model is initialized. It will be called for each object returned from a find, and thus can potentially affect performance as noted in the Rails API documentation.

### References

* 1 2 3 "Because after_find and after_initialize are called for each object found and instantiated by a finder, such as Base.find(:all), we’ve had to implement a simple performance constraint (50% more speed on a simple test case). Unlike all the other callbacks, after_find and after_initialize will only be run if an explicit implementation is defined (def after_find). In that case, all of the callback types will be called."
# Ruby on Rails/ActiveRecord/Calculations
## Calculations

Calculations provide methods for calculating aggregate values of columns in ActiveRecord models.

### Calculate

All calculations are handled through the calculate method. The calculate method accepts the name of the operation, the column name and any options. The options can be used to customize the query with :conditions, :order, :group, :having and :joins.
The supported calculations are:
* average
* sum
* minimum
* maximum
* count
The calculate method has two modes of working. If the :group option is not set then the result will be returned as a single numeric value (fixnum for count, float for average and the column type for everything else). If the :group option is set then the result is returned as an ordered Hash of the values and groups them by the :group column. The :group option takes either a column name or the name of a belongs_to association.
Note that if a condition specified in the calculation results in no values returned from the underlying table then the calculate method will return nil.
For example:

### Average

You can use the average method to calculate the average value for a particular column. For example:
Will return the average age of all people in the Person model.
An example of customizing the query:
This would return the average age of people who are 55 or older.

### Sum

The sum method will calculate the sum for a particular column. For example:
Will return the sum of products in stock.
An example of customizing the query:
Will return the sum of the number of products which are in category 10 and in stock.

### Minimum

The minimum method will calculate the minimum value for a particular column. For example:
Will return the lowest amount donated.
An example of customizing the query:
This will return the lowest amount donated within the last year.

### Maximum

The maximum method will calculate the maximum value for a particular column. For example:
Will return the largest amount donated.
An example of customizing the query:
This will return the largest amount donated within the last year.

### Count

Counts the number of items matching the condition(s).
Will return the number of TestResult objects in the database.
An example of customizing the query:
Will return the number of TestResult objects whose starttime field is within the last 24 hours.
# Ruby on Rails/ActiveRecord/Migrations/SQL

The migration system have a lot of helpers you can use to do the stuff you want to do. Sometimes you need to do stuff that's not covered by these helpers, though. That's where the execute helper comes in.

## The execute helper

The execute helper is a method for use in migrations that takes one attribute - a SQL command, as a string, and will execute the SQL just like any other migration. It will also break the migration process (like the migration helpers do) if the SQL server returned an error when executing the command.
# Ruby on Rails/ActiveRecord/Timestamps

Active Record automatically timestamps during create and update operations if the table has fields created_at/created_on or updated_at/updated_on. This can be disabled on individual models by setting @self.record_timestamps = false@ in the class definition for the model. For example:
Although there is no explicit requirement, typically the _on fields should be date types, whereas the _at fields should be datetime types.
Timestamps are in the local timezone by default but can use UTC by setting ActiveRecord::Base.default_timezone = :utc. This will normally be specified in config/environment.rb.
Source: active_record/timestamp.rb
# Ruby on Rails/ActiveRecord/Aggregations
## Aggregations

Active Record implements aggregation through a macro-like class method called composed_of for representing attributes as value objects. It expresses relationships like "Account [is] composed of Money [among other things]" or "Person [is] composed of [an] address". Each call to the macro adds a description of how the value objects are created from the attributes of the entity object (when the entity is initialized either as a new object or from finding an existing object) and how it can be turned back into attributes (when the entity is saved to the database).
Example:
The customer class now has the following methods to manipulate the value objects:
These methods will operate with value objects like the ones described below:
Now it’s possible to access attributes from the database through the value objects instead. If you choose to name the composition the same as the attributes name, it will be the only way to access that attribute. That’s the case with our balance attribute. You interact with the value objects just like you would any other attribute, though:
Value objects can also be composed of multiple attributes such as the case of Address. The order of the mappings will determine the order of the parameters. Example:

### Writing value objects

Value objects are immutable and interchangeable objects that represent a given value such as a Money object representing $5. Two Money objects both representing $5 should be equal (through methods such as == and <=> from Comparable if ranking makes sense). This is unlike entity objects where equality is determined by identity. An entity class such as Customer can easily have two different objects that both have an address on Hyancintvej. Entity identity is determined by object or relational unique identifiers (such as primary keys). Normal ActiveRecord::Base classes are entity objects.
It’s also important to treat the value objects as immutable. Don‘t allow the Money object to have its amount changed after creation. Create a new money object with the new value instead. This is exemplified by the Money#exchanged_to method that returns a new value object instead of changing its own values. Active Record won’t persist value objects that have been changed through other means than the writer method.
The immutable requirement is enforced by Active Record by freezing any object assigned as a value object. Attempting to change it afterwards will result in a TypeError.
# Ruby on Rails/ActiveRecord/Connection adapters

ActiveRecord abstracts the connection to the database through connection adapters. It currently supports the following databases:
* DB2
* Firebird
* FrontBase
* MySQL
* OpenBase
* Oracle
* Postgresql
* SQL Lite
* SQL Server
* Sybase
If you need to access the current connection adapter directly you can do so through the ActiveRecord::Base.connection class method. All connection adapters share some common functionality which is defined in the following source files:
* active_record/connection_adapters/abstract_adapter.rb
* active_record/connection_adapters/abstract/connection_specification.rb
* active_record/connection_adapters/abstract/database_statements.rb
* active_record/connection_adapters/abstract/quoting.rb
* active_record/connection_adapters/abstract/schema_definition.rb
* active_record/connection_adapters/abstract/schema_statements.rb
# Ruby on Rails/ActiveRecord/Naming
## Naming
### Basics

ActiveRecord uses convention for naming classes, tables and fields. Rails uses convention over configuration. ActiveRecord expects applications to follow certain naming conventions. These conventions extend from file naming, class naming, table naming and more. By default classes are singular, tables are plural, primary keys are id and foreign keys are table_id.
Note: There are also certain names that are reserved and should not be used in your model for attributes outside of the conventions defined in Rails:
* lock_version
* type - This is only used when you have single table inheritance and must contain a class name
* id - Reserved for primary keys
* table_name_count - Reserved for counter cache
* position - Reserved for acts_as_list
* parent_id - Reserved for acts_as_tree
* lft - Reserved for acts_as_nested_set
* rgt - Reserved for acts_as_nested_set
* quote - Method in ActiveRecord::Base which is used to quote SQL
* template
* class

### Classes

ActiveRecord classes are named in singular form.

### Tables

Tables for ActiveRecord objects are named in plural form by default. This pluralization is often an initial point of contention for new Rails users.
For a class named 'Dog', the default table name is 'Dogs'.
If you need to change the table name there are several ways to override the default behavior.

#### Set use_pluralization

In config/environment.rb you can specify ActiveRecord::Base.use_pluralization = false. This will apply to all ActiveRecord objects.

#### Use set_table_name

You can call set_table_name to specify a custom table name for a particular model.
For example:

#### Override table_name

You can also override the table_name method and return a value.
For example: