The Vatican Apostolic Library (), more commonly called the Vatican Library or simply the Vat, is the library of the Holy See, located in Vatican City. Formally established in 1475, although it is much older, it is one of the oldest libraries in the world and contains one of the most significant collections of historical texts. It has 75,000 codices from throughout history, as well as 1.1 million printed books, which include some 8,500 incunabula.

The Vatican Library is a research library for history, law, philosophy, science and theology. The Vatican Library is open to anyone who can document their qualifications and research needs. Photocopies for private study of pages from books published between 1801 and 1990 can be requested in person or by mail.

In March 2014, the Vatican Library began an initial four-year project of digitising its collection of manuscripts, to be made available online.

The Vatican Secret Archives were separated from the library at the beginning of the 17th century; they contain another 150,000 items.

Scholars have traditionally divided the history of the library into five periods, Pre-Lateran, Lateran, Avignon, Pre-Vatican and Vatican.

The Pre-Lateran period, comprising the initial days of the library, dated from the earliest days of the Church. Only a handful of volumes survive from this period, though some are very significant.

Q: When was the Vat formally opened?
A: It was formally established in 1475

Q: what is the library for?
A: research

Q: for what subjects?
A: history, and law

Q: and?
A: philosophy, science and theology

Q: what was started in 2014?
A: a  project

Question: how do scholars divide the library?


The Vatican Apostolic Library (), more commonly called the Vatican Library or simply the Vat, is the library of the Holy See, located in Vatican City. Formally established in 1475, although it is much older, it is one of the oldest libraries in the world and contains one of the most significant collections of historical texts. It has 75,000 codices from throughout history, as well as 1.1 million printed books, which include some 8,500 incunabula.

The Vatican Library is a research library for history, law, philosophy, science and theology. The Vatican Library is open to anyone who can document their qualifications and research needs. Photocopies for private study of pages from books published between 1801 and 1990 can be requested in person or by mail.

In March 2014, the Vatican Library began an initial four-year project of digitising its collection of manuscripts, to be made available online.

The Vatican Secret Archives were separated from the library at the beginning of the 17th century; they contain another 150,000 items.

Scholars have traditionally divided the history of the library into five periods, Pre-Lateran, Lateran, Avignon, Pre-Vatican and Vatican.

The Pre-Lateran period, comprising the initial days of the library, dated from the earliest days of the Church. Only a handful of volumes survive from this period, though some are very significant.

Q: When was the Vat formally opened?
A: It was formally established in 1475

Q: what is the library for?
A: research

Q: for what subjects?
A: history, and law

Q: and?
A: philosophy, science and theology

Q: what was started in 2014?
A: a  project

Q: how do scholars divide the library?
A: into periods

Question: how many?


The Vatican Apostolic Library (), more commonly called the Vatican Library or simply the Vat, is the library of the Holy See, located in Vatican City. Formally established in 1475, although it is much older, it is one of the oldest libraries in the world and contains one of the most significant collections of historical texts. It has 75,000 codices from throughout history, as well as 1.1 million printed books, which include some 8,500 incunabula.

The Vatican Library is a research library for history, law, philosophy, science and theology. The Vatican Library is open to anyone who can document their qualifications and research needs. Photocopies for private study of pages from books published between 1801 and 1990 can be requested in person or by mail.

In March 2014, the Vatican Library began an initial four-year project of digitising its collection of manuscripts, to be made available online.

The Vatican Secret Archives were separated from the library at the beginning of the 17th century; they contain another 150,000 items.

Scholars have traditionally divided the history of the library into five periods, Pre-Lateran, Lateran, Avignon, Pre-Vatican and Vatican.

The Pre-Lateran period, comprising the initial days of the library, dated from the earliest days of the Church. Only a handful of volumes survive from this period, though some are very significant.

Q: When was the Vat formally opened?
A: It was formally established in 1475

Q: what is the library for?
A: research

Q: for what subjects?
A: history, and law

Q: and?
A: philosophy, science and theology

Q: what was started in 2014?
A: a  project

Q: how do scholars divide the library?
A: into periods

Q: how many?
A: five

Question: what is the official name of the Vat?


The Vatican Apostolic Library (), more commonly called the Vatican Library or simply the Vat, is the library of the Holy See, located in Vatican City. Formally established in 1475, although it is much older, it is one of the oldest libraries in the world and contains one of the most significant collections of historical texts. It has 75,000 codices from throughout history, as well as 1.1 million printed books, which include some 8,500 incunabula.

The Vatican Library is a research library for history, law, philosophy, science and theology. The Vatican Library is open to anyone who can document their qualifications and research needs. Photocopies for private study of pages from books published between 1801 and 1990 can be requested in person or by mail.

In March 2014, the Vatican Library began an initial four-year project of digitising its collection of manuscripts, to be made available online.

The Vatican Secret Archives were separated from the library at the beginning of the 17th century; they contain another 150,000 items.

Scholars have traditionally divided the history of the library into five periods, Pre-Lateran, Lateran, Avignon, Pre-Vatican and Vatican.

The Pre-Lateran period, comprising the initial days of the library, dated from the earliest days of the Church. Only a handful of volumes survive from this period, though some are very significant.

Q: When was the Vat formally opened?
A: It was formally established in 1475

Q: what is the library for?
A: research

Q: for what subjects?
A: history, and law

Q: and?
A: philosophy, science and theology

Q: what was started in 2014?
A: a  project

Q: how do scholars divide the library?
A: into periods

Q: how many?
A: five

Q: what is the official name of the Vat?
A: The Vatican Apostolic Library

Question: where is it?


The Vatican Apostolic Library (), more commonly called the Vatican Library or simply the Vat, is the library of the Holy See, located in Vatican City. Formally established in 1475, although it is much older, it is one of the oldest libraries in the world and contains one of the most significant collections of historical texts. It has 75,000 codices from throughout history, as well as 1.1 million printed books, which include some 8,500 incunabula.

The Vatican Library is a research library for history, law, philosophy, science and theology. The Vatican Library is open to anyone who can document their qualifications and research needs. Photocopies for private study of pages from books published between 1801 and 1990 can be requested in person or by mail.

In March 2014, the Vatican Library began an initial four-year project of digitising its collection of manuscripts, to be made available online.

The Vatican Secret Archives were separated from the library at the beginning of the 17th century; they contain another 150,000 items.

Scholars have traditionally divided the history of the library into five periods, Pre-Lateran, Lateran, Avignon, Pre-Vatican and Vatican.

The Pre-Lateran period, comprising the initial days of the library, dated from the earliest days of the Church. Only a handful of volumes survive from this period, though some are very significant.

Q: When was the Vat formally opened?
A: It was formally established in 1475

Q: what is the library for?
A: research

Q: for what subjects?
A: history, and law

Q: and?
A: philosophy, science and theology

Q: what was started in 2014?
A: a  project

Q: how do scholars divide the library?
A: into periods

Q: how many?
A: five

Q: what is the official name of the Vat?
A: The Vatican Apostolic Library

Q: where is it?
A: in Vatican City

Question: how many printed books does it contain?


Myanmar 's pro-democracy leader Aung San Suu Kyi will return home late Friday but will remain in detention after recovering from surgery at a Yangon hospital , her personal physician said .

Myanmar 's pro-democracy leader Aung San Suu Kyi will be kept under house arrest following her release from a hospital where she underwent surgery , her personal physician said Friday .


Robert Walsh , 40 , remained in critical but stable condition Friday at Staten Island University Hospital 's north campus .

Walsh , also 40 , was in critical but stable condition at Staten Island University Hospital last night .


In fiction : Edward P. Jones ( " The Known World " ) and Scott Spencer ( " A Ship Made of Paper " ) .

The fifth nominee for fiction is Scott Spencer , for A Ship Made of Paper .


Because of the accounting charge , the company now says it lost $ 1.04 billion , or 32 cents a share , in the quarter ended June 30 .

Including the charge , the Santa Clara , Calif.-based company said Monday it lost $ 1.04 billion , or 32 cents per share , in the period ending June 30 .


The top rate will go to 4.45 percent for all residents with taxable incomes above $ 500,000 .

For residents with incomes above $ 500,000 , the income-tax rate will increase to 4.45 percent .


The S & P / TSX composite rose 87.74 points on the week , while the TSX Venture Exchange composite gained 44.49 points .

On the week , the Dow Jones industrial average rose 11.56 points , while the Nasdaq Stock Market gained 39.42 points .


Nearly 300 mutinous troops who seized a Manila shopping and apartment complex demanding the government resign gave up and retreated peacefully after some 19 hours .

Mutinous troops who seized a Manila shopping and apartment complex demanding the government resign ended a 19-hour standoff late Sunday and returned to barracks without a shot fired .


" Jeremy 's a good guy , " Barber said , adding : " Jeremy is living the dream life of the New York athlete .

He also said Shockey is " living the dream life of a New York athlete .


Carlson on Tuesday said he would not recuse himself from the case .

Service officials said Carlson refused to recuse himself from the case .


At community colleges , tuition will jump to $ 2,800 from $ 2,500 .

Community college students will see their tuition rise by $ 300 to $ 2,800 or 12 percent .


---
license: apache-2.0
---
# Cross-Encoder for MS Marco

This model was trained on the [MS Marco Passage Ranking](https://github.com/microsoft/MSMARCO-Passage-Ranking) task.

The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See [SBERT.net Retrieve & Re-rank](https://www.sbert.net/examples/applications/retrieve_rerank/README.html) for more details. The training code is available here: [SBERT.net Training MS Marco](https://github.com/UKPLab/sentence-transformers/tree/master/examples/training/ms_marco)

## Usage with Transformers

```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model = AutoModelForSequenceClassification.from_pretrained('model_name')
tokenizer = AutoTokenizer.from_pretrained('model_name')

features = tokenizer(['How many people live in Berlin?', 'How many people live in Berlin?'], ['Berlin has a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers.', 'New York City is famous for the Metropolitan Museum of Art.'],  padding=True, truncation=True, return_tensors="pt")

model.eval()
with torch.no_grad():
    scores = model(**features).logits
    print(scores)
```

## Usage with SentenceTransformers

The usage becomes easier when you have [SentenceTransformers](https://www.sbert.net/) installed. Then, you can use the pre-trained models like this:
```python
from sentence_transformers import CrossEncoder
model = CrossEncoder('model_name', max_length=512)
scores = model.predict([('Query', 'Paragraph1'), ('Query', 'Paragraph2') , ('Query', 'Paragraph3')])
```

## Performance
In the following table, we provide various pre-trained Cross-Encoders together with their performance on the [TREC Deep Learning 2019](https://microsoft.github.io/TREC-2019-Deep-Learning/) and the [MS Marco Passage Reranking](https://github.com/microsoft/MSMARCO-Passage-Ranking/) dataset.

| Model-Name        | NDCG@10 (TREC DL 19) | MRR@10 (MS Marco Dev)  | Docs / Sec |
| ------------- |:-------------| -----| --- |
| **Version 2 models** | | |
| cross-encoder/ms-marco-TinyBERT-L-2-v2 | 69.84 | 32.56 | 9000
| cross-encoder/ms-marco-MiniLM-L-2-v2 | 71.01 | 34.85 | 4100
| cross-encoder/ms-marco-MiniLM-L-4-v2 | 73.04 | 37.70 | 2500
| cross-encoder/ms-marco-MiniLM-L-6-v2 | 74.30 | 39.01 | 1800
| cross-encoder/ms-marco-MiniLM-L-12-v2 | 74.31 | 39.02 | 960
| **Version 1 models** | | |
| cross-encoder/ms-marco-TinyBERT-L-2  | 67.43 | 30.15  | 9000
| cross-encoder/ms-marco-TinyBERT-L-4  | 68.09 | 34.50  | 2900
| cross-encoder/ms-marco-TinyBERT-L-6 |  69.57 | 36.13  | 680
| cross-encoder/ms-marco-electra-base | 71.99 | 36.41 | 340
| **Other models** | | |
| nboost/pt-tinybert-msmarco | 63.63 | 28.80 | 2900
| nboost/pt-bert-base-uncased-msmarco | 70.94 | 34.75 | 340
| nboost/pt-bert-large-msmarco | 73.36 | 36.48 | 100
| Capreolus/electra-base-msmarco | 71.23 | 36.89 | 340
| amberoad/bert-multilingual-passage-reranking-msmarco | 68.40 | 35.54 | 330
| sebastian-hofstaetter/distilbert-cat-margin_mse-T2-msmarco | 72.82 | 37.88 | 720

 Note: Runtime was computed on a V100 GPU.


---
license: mit
thumbnail: https://huggingface.co/front/thumbnails/facebook.png
pipeline_tag: zero-shot-classification
datasets:
- multi_nli
---

# bart-large-mnli

This is the checkpoint for [bart-large](https://huggingface.co/facebook/bart-large) after being trained on the [MultiNLI (MNLI)](https://huggingface.co/datasets/multi_nli) dataset.

Additional information about this model:
- The [bart-large](https://huggingface.co/facebook/bart-large) model page
- [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
](https://arxiv.org/abs/1910.13461)
- [BART fairseq implementation](https://github.com/pytorch/fairseq/tree/master/fairseq/models/bart)

## NLI-based Zero Shot Text Classification

[Yin et al.](https://arxiv.org/abs/1909.00161) proposed a method for using pre-trained NLI models as a ready-made zero-shot sequence classifiers. The method works by posing the sequence to be classified as the NLI premise and to construct a hypothesis from each candidate label. For example, if we want to evaluate whether a sequence belongs to the class "politics", we could construct a hypothesis of `This text is about politics.`. The probabilities for entailment and contradiction are then converted to label probabilities.

This method is surprisingly effective in many cases, particularly when used with larger pre-trained models like BART and Roberta. See [this blog post](https://joeddav.github.io/blog/2020/05/29/ZSL.html) for a more expansive introduction to this and other zero shot methods, and see the code snippets below for examples of using this model for zero-shot classification both with Hugging Face's built-in pipeline and with native Transformers/PyTorch code.

#### With the zero-shot classification pipeline

The model can be loaded with the `zero-shot-classification` pipeline like so:

```python
from transformers import pipeline
classifier = pipeline("zero-shot-classification",
                      model="facebook/bart-large-mnli")
```

You can then use this pipeline to classify sequences into any of the class names you specify.

```python
sequence_to_classify = "one day I will see the world"
candidate_labels = ['travel', 'cooking', 'dancing']
classifier(sequence_to_classify, candidate_labels)
#{'labels': ['travel', 'dancing', 'cooking'],
# 'scores': [0.9938651323318481, 0.0032737774308770895, 0.002861034357920289],
# 'sequence': 'one day I will see the world'}
```

If more than one candidate label can be correct, pass `multi_class=True` to calculate each class independently:

```python
candidate_labels = ['travel', 'cooking', 'dancing', 'exploration']
classifier(sequence_to_classify, candidate_labels, multi_class=True)
#{'labels': ['travel', 'exploration', 'dancing', 'cooking'],
# 'scores': [0.9945111274719238,
#  0.9383890628814697,
#  0.0057061901316046715,
#  0.0018193122232332826],
# 'sequence': 'one day I will see the world'}
```

#### With manual PyTorch

```python
# pose sequence as a NLI premise and label as a hypothesis
from transformers import AutoModelForSequenceClassification, AutoTokenizer
nli_model = AutoModelForSequenceClassification.from_pretrained('facebook/bart-large-mnli')
tokenizer = AutoTokenizer.from_pretrained('facebook/bart-large-mnli')

premise = sequence
hypothesis = f'This example is {label}.'

# run through model pre-trained on MNLI
x = tokenizer.encode(premise, hypothesis, return_tensors='pt',
                     truncation_strategy='only_first')
logits = nli_model(x.to(device))[0]

# we throw away "neutral" (dim 1) and take the probability of
# "entailment" (2) as the probability of the label being true
entail_contradiction_logits = logits[:,[0,2]]
probs = entail_contradiction_logits.softmax(dim=1)
prob_label_is_true = probs[:,1]
```


---
language: "en"
tags:
- financial-sentiment-analysis
- sentiment-analysis
widget:
- text: "Stocks rallied and the British pound gained."
---

FinBERT is a pre-trained NLP model to analyze sentiment of financial text. It is built by further training the BERT language model in the finance domain, using a large financial corpus and thereby fine-tuning it for financial sentiment classification. [Financial PhraseBank](https://www.researchgate.net/publication/251231107_Good_Debt_or_Bad_Debt_Detecting_Semantic_Orientations_in_Economic_Texts) by Malo et al. (2014) is used for fine-tuning. For more details, please see the paper [FinBERT: Financial Sentiment Analysis with Pre-trained Language Models](https://arxiv.org/abs/1908.10063) and our related [blog post](https://medium.com/prosus-ai-tech-blog/finbert-financial-sentiment-analysis-with-bert-b277a3607101) on Medium.

The model will give softmax outputs for three labels: positive, negative or neutral.

---

About Prosus

Prosus is a global consumer internet group and one of the largest technology investors in the world. Operating and investing globally in markets with long-term growth potential, Prosus builds leading consumer internet companies that empower people and enrich communities. For more information, please visit www.prosus.com.

Contact information

Please contact Dogu Araci dogu.araci[at]prosus[dot]com and Zulkuf Genc zulkuf.genc[at]prosus[dot]com about any FinBERT related issues and questions.


---
language: python
datasets:
- fever
- glue
- multi_nli
- tals/vitaminc
---
# Details
Model used in [Get Your Vitamin C! Robust Fact Verification with Contrastive Evidence](https://aclanthology.org/2021.naacl-main.52/) (Schuster et al., NAACL 21`).

For more details see: https://github.com/TalSchuster/VitaminC

When using this model, please cite the paper.

# BibTeX entry and citation info

```bibtex
@inproceedings{schuster-etal-2021-get,
    title = "Get Your Vitamin {C}! Robust Fact Verification with Contrastive Evidence",
    author = "Schuster, Tal  and
      Fisch, Adam  and
      Barzilay, Regina",
    booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
    month = jun,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.naacl-main.52",
    doi = "10.18653/v1/2021.naacl-main.52",
    pages = "624--643",
    abstract = "Typical fact verification models use retrieved written evidence to verify claims. Evidence sources, however, often change over time as more information is gathered and revised. In order to adapt, models must be sensitive to subtle differences in supporting evidence. We present VitaminC, a benchmark infused with challenging cases that require fact verification models to discern and adjust to slight factual changes. We collect over 100,000 Wikipedia revisions that modify an underlying fact, and leverage these revisions, together with additional synthetically constructed ones, to create a total of over 400,000 claim-evidence pairs. Unlike previous resources, the examples in VitaminC are contrastive, i.e., they contain evidence pairs that are nearly identical in language and content, with the exception that one supports a given claim while the other does not. We show that training using this design increases robustness{---}improving accuracy by 10{\%} on adversarial fact verification and 6{\%} on adversarial natural language inference (NLI). Moreover, the structure of VitaminC leads us to define additional tasks for fact-checking resources: tagging relevant words in the evidence for verifying the claim, identifying factual revisions, and providing automatic edits via factually consistent text generation.",
}

```


---
language:
- en
thumbnail: https://avatars3.githubusercontent.com/u/32437151?s=460&u=4ec59abc8d21d5feea3dab323d23a5860e6996a4&v=4
tags:
- text-classification
- emotion
- pytorch
license: apache-2.0
datasets:
- emotion
metrics:
- Accuracy, F1 Score
model-index:
- name: bhadresh-savani/distilbert-base-uncased-emotion
  results:
  - task:
      type: text-classification
      name: Text Classification
    dataset:
      name: emotion
      type: emotion
      config: default
      split: test
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.927
      verified: true
    - name: Precision Macro
      type: precision
      value: 0.8880230732280744
      verified: true
    - name: Precision Micro
      type: precision
      value: 0.927
      verified: true
    - name: Precision Weighted
      type: precision
      value: 0.9272902840835793
      verified: true
    - name: Recall Macro
      type: recall
      value: 0.8790126653780703
      verified: true
    - name: Recall Micro
      type: recall
      value: 0.927
      verified: true
    - name: Recall Weighted
      type: recall
      value: 0.927
      verified: true
    - name: F1 Macro
      type: f1
      value: 0.8825061528287809
      verified: true
    - name: F1 Micro
      type: f1
      value: 0.927
      verified: true
    - name: F1 Weighted
      type: f1
      value: 0.926876082854655
      verified: true
    - name: loss
      type: loss
      value: 0.17403268814086914
      verified: true
---
# Distilbert-base-uncased-emotion

## Model description:
[Distilbert](https://arxiv.org/abs/1910.01108) is created with knowledge distillation during the pre-training phase which reduces the size of a BERT model by 40%, while retaining 97% of its language understanding. It's smaller, faster than Bert and any other Bert-based model.

[Distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) finetuned on the emotion dataset using HuggingFace Trainer with below Hyperparameters
```
 learning rate 2e-5,
 batch size 64,
 num_train_epochs=8,
```

## Model Performance Comparision on Emotion Dataset from Twitter:

| Model | Accuracy | F1 Score |  Test Sample per Second |
| --- | --- | --- | --- |
| [Distilbert-base-uncased-emotion](https://huggingface.co/bhadresh-savani/distilbert-base-uncased-emotion) | 93.8 | 93.79 | 398.69 |
| [Bert-base-uncased-emotion](https://huggingface.co/bhadresh-savani/bert-base-uncased-emotion) | 94.05 | 94.06 | 190.152 |
| [Roberta-base-emotion](https://huggingface.co/bhadresh-savani/roberta-base-emotion) | 93.95 | 93.97| 195.639 |
| [Albert-base-v2-emotion](https://huggingface.co/bhadresh-savani/albert-base-v2-emotion) | 93.6 | 93.65 | 182.794 |

## How to Use the model:
```python
from transformers import pipeline
classifier = pipeline("text-classification",model='bhadresh-savani/distilbert-base-uncased-emotion', return_all_scores=True)
prediction = classifier("I love using transformers. The best part is wide range of support and its easy to use", )
print(prediction)

"""
Output:
[[
{'label': 'sadness', 'score': 0.0006792712374590337},
{'label': 'joy', 'score': 0.9959300756454468},
{'label': 'love', 'score': 0.0009452480007894337},
{'label': 'anger', 'score': 0.0018055217806249857},
{'label': 'fear', 'score': 0.00041110432357527316},
{'label': 'surprise', 'score': 0.0002288572577526793}
]]
"""
```

## Dataset:
[Twitter-Sentiment-Analysis](https://huggingface.co/nlp/viewer/?dataset=emotion).

## Training procedure
[Colab Notebook](https://github.com/bhadreshpsavani/ExploringSentimentalAnalysis/blob/main/SentimentalAnalysisWithDistilbert.ipynb)

## Eval results
```json
{
'test_accuracy': 0.938,
 'test_f1': 0.937932884041714,
 'test_loss': 0.1472451239824295,
 'test_mem_cpu_alloc_delta': 0,
 'test_mem_cpu_peaked_delta': 0,
 'test_mem_gpu_alloc_delta': 0,
 'test_mem_gpu_peaked_delta': 163454464,
 'test_runtime': 5.0164,
 'test_samples_per_second': 398.69
 }
```

## Reference:
* [Natural Language Processing with Transformer By Lewis Tunstall, Leandro von Werra, Thomas Wolf](https://learning.oreilly.com/library/view/natural-language-processing/9781098103231/)


The present results suggest that this finding reflects only part of the picture: The opposite manipulation, selectively enhancing the predictability of the integrated organization, leads also to a strong opposite effect, namely a notable increase in the perception of stream integration. This is shown by the present condition 3 (integrated organization predictable) that leads to a higher proportion of integrated percepts than any other condition. Together, the effects of selectively enhancing integrated versus segregated predictability were three to four times larger than the ones previously observed when manipulating segregated predictability alone [5, 30] . These pronounced predictability effects resulted from directional predictability -i.e., predictive relations that favor either integration or segregation, but not both. In information-theoretic terms, condition 4 is more predictable than any other condition; yet it does not cause the strongest effects on perception.

Together, the effects of selectively enhancing integrated versus segregated predictability were three to four times larger than the ones previously observed when manipulating segregated predictability alone.


Currently, in social science, more and more data collected by different researchers or institutions are being used, and the research goals they attempt to achieve are different from the primary motivations for collecting the data. There are three basic reasons for why interest in using secondary data is increasing: general (a researcher uses a broad range of materials concerning different areas and ages, which is conducive to a more comprehensive and deeper analysis and would be impossible using solely the primary data from an individual research project), doi: 10.17221/14/2014-AGRICECON methodological (rather than a researcher's producing a number of studies, the researcher's data collected from observations or interviews can be combined with the data collected by others); and economic (collecting primary data is very expensive). Using existing data is much less expensive than collecting new ones (Goodman 1992) .

Using existing data is much less expensive than collecting new ones.


In recent years, paper-based analytical devices have been used with very promising results in terms of public health, food and environmental contaminants. This type of analytical devices has unique advantages over other platforms. Its porous structure and the superficial groups contributed to the immobilization of enzymes, antibodies and DNA, among others. Besides, it is a biocompatible, economical, easy to use and accessible material, features which make it more advantageous than other platform materials such as glass or polymers [1] [2] [3] [4] .

Besides, it is a biocompatible, economical, easy to use and accessible material, features which make it more advantageous than other platform materials such as glass or polymers.


The Santa Barbara Amorphous (SBA-15) is one of the mesoporous materials that has aroused great interest among researchers due to its unique properties to improve the surface area. The pore size that can be modified according to its synthesis, the high hydrothermal and mechanical stability as well as the lower susceptibility to shrinkage are outstanding qualities of this material [10] [11] [12] [13] [14] [15] . Its silica composition allows to functionalize its surface in a simple way, to enhance its advantage and immobilize different biomolecules [16] [17] [18] .

The pore size that can be modified according to its synthesis, the high hydrothermal and mechanical stability as well as the lower susceptibility to shrinkage are outstanding qualities of this material.

Its silica composition allows to functionalize its surface in a simple way, to enhance its advantage and immobilize different biomolecules.


The unfavorable role of Treg in cancers has extensively been demonstrated in the past decades, also in breast cancer. Most publications show a detrimental role on overall survival with high Treg numbers in breast cancer tissues [19, 33] . In order to prevent Treg accumulation at the tumor site, a profound knowledge of the mechanisms of Treg migration is indispensable. In 2004, CCL22 was identified as a Treg attracting chemokine in ovarian cancer [21] . Since then, the role for CCL22 in attraction of CCR4+ Treg to tumors was proven in numerous studies [25, 34, 35] . Other chemokines which have been associated with Treg recruitment to tumors are CCL1, CCL5, CCL17, CCL20 and CCL28, acting on the chemokine receptors CCR4, CCR5, CCR6, CCR8 and CCR10 [22, [36] [37] [38] . Amongst these, CCL1 has been described to play a role on Treg de novo conversion and Treg recruitment to murine breast cancer models [32, 39] . CCL1 binds to CCR8, a receptor that is known to be crucial for Treg function and proliferation [39] . In order to investigate the role of CCL1 and CCL22 on Treg infiltration and overall survival in breast cancer patients, we stained tissue microarrays of 199 breast cancer patients for the CCL1, CCL22 and FoxP3. Surprisingly, our data showed upregulation of CCL1 in breast cancer tissues, whereas CCL22 expression was not elevated when compared to normal breast tissue and did not correlate with Treg infiltration.

Most publications show a detrimental role on overall survival with high Treg numbers in breast cancer tissues.

In 2004, CCL22 was identified as a Treg attracting chemokine in ovarian cancer.

Since then, the role for CCL22 in attraction of CCR4+ Treg to tumors was proven in numerous studies.

Other chemokines which have been associated with Treg recruitment to tumors are CCL1, CCL5, CCL17, CCL20 and CCL28, acting on the chemokine receptors CCR4, CCR5, CCR6, CCR8 and CCR10.

Amongst these, CCL1 has been described to play a role on Treg de novo conversion and Treg recruitment to murine breast cancer models.

CCL1 binds to CCR8, a receptor that is known to be crucial for Treg function and proliferation.


Future projections of global urban population estimate further growth, with 64%-69% living in cities by 2050 [3] . This will put even more pressure on current urban environments and infrastructures and will create a greater demand for space and energy. Yet, the ability of cities to mitigate and adapt to CC by reducing their GHG emissions and improving their urban environments and microclimates is underexploited and this is represented by fragmented and sectorial technical strategies and policies concerning CC.

Future projections of global urban population estimate further growth, with 64%-69% living in cities by 2050.


The success rate of PNA in the literature varies from 79-100% [10, 35] . The success rate in our study after single aspiration was 30%, after second aspiration 63% and after third aspiration it was 77%. Although, needle aspiration is a much simpler procedure when compared to catheter drainage repeated procedures are quite unpleasant and traumatic for the patients and may not be acceptable to many. Even after repeated aspirations the success rate was far from being 100%. Therefore, those patients who failed after a third aspiration attempt were offered catheter drainage.

The success rate of PNA in the literature varies from 79-100%.


Finite-element discretization of the second-order wave equation leads to a stiffness and a mass matrix. Mass lumping avoids the cost of inverting the latter and allows for explicit time stepping. To maintain the spatial accuracy and time-stepping stability, the weights obtained by mass lumping should be positive and provide sufficient accuracy [1] .

To maintain the spatial accuracy and time-stepping stability, the weights obtained by mass lumping should be positive and provide sufficient accuracy.


Mass lumping is related to numerical quadrature. Given a reference element, the row sums of its contribution to the mass matrix are identical to numerical integration weights with a certain accuracy. As there is a map from the triangle to one octant of the surface of a sphere, there is a relation between quadrature on either [7] [8] [9] . The requirement of continuity across element boundaries provides an additional constraint.

As there is a map from the triangle to one octant of the surface of a sphere, there is a relation between quadrature on either.


In the brain, MA binds to dopamine, nor-epinephrine and serotonin transporters on the neuronal cells and stimulates the fight-or-flight response via excessive stimulation of the sympathetic nervous system [7, 8] . Using MA in the short-term MA therefore improves productivity, attention-span and energy levels, and may even reduce anxiety [9] . In contrast, however, chronic use depletes dopamine stores in the brain and damages the ability of dopamine and serotonin to bind to their terminals [7] . This renders the chronic user incapable of experiencing pleasure naturally and may therefore lead to depression [9] . Another complication of long-term use is impaired neuropsychiatric function, including motorand executive function as well as episodic memory, which is commonly associated with anxiety and depression [10] .

In the brain, MA binds to dopamine, nor-epinephrine and serotonin transporters on the neuronal cells and stimulates the fight-or-flight response via excessive stimulation of the sympathetic nervous system.

Using MA in the short-term MA therefore improves productivity, attention-span and energy levels, and may even reduce anxiety.

In contrast, however, chronic use depletes dopamine stores in the brain and damages the ability of dopamine and serotonin to bind to their terminals.

This renders the chronic user incapable of experiencing pleasure naturally and may therefore lead to depression.

Another complication of long-term use is impaired neuropsychiatric function, including motorand executive function as well as episodic memory, which is commonly associated with anxiety and depression.


Protect master branch

Protect master branch
 After accidental merge commit (91c55355b634d0dc73350a7ddee1a6776dbbdd69) into `datasets` master branch, all commits present in the feature branch were permanently added to `datasets` master branch history, as e.g.:
- 00cc036fea7c7745cfe722360036ed306796a3f2
- 13ae8c98602bbad8197de3b9b425f4c78f582af1
- ...

I propose to protect our master branch, so that we avoid we can accidentally make this kind of mistakes in the future:
- [x] For Pull Requests using GitHub, allow only squash merging, so that only a single commit per Pull Request is merged into the master branch
  - Currently, simple merge commits are already disabled
  - I propose to disable rebase merging as well
- ~~Protect the master branch from direct pushes (to avoid accidentally pushing of merge commits)~~
  - ~~This protection would reject direct pushes to master branch~~
  - ~~If so, for each release (when we need to commit directly to the master branch), we should previously disable the protection and re-enable it again after the release~~
- [x] Protect the master branch only from direct pushing of **merge commits**
  - GitHub offers the possibility to protect the master branch only from merge commits (which are the ones that introduce all the commits from the feature branch into the master branch).
  - No need to disable/re-enable this protection on each release

This purpose of this Issue is to open a discussion about this problem and to agree in a solution.
 @lhoestq now the 2 are implemented.

Please note that for the the second protection, finally I have chosen to protect the master branch only from **merge commits** (see update comment above), so no need to disable/re-enable the protection on each release (direct commits, different from merge commits, can be pushed to the remote master branch; and eventually reverted without messing up the repo history).


Backwards compatibility broken for cached datasets that use `.filter()`
 ## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`

Related feature: https://github.com/huggingface/datasets/pull/2836

:question:  This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)

## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.

## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.

2. `pip install datasets==1.11.0` and run the following snippet:

```python
from datasets import load_dataset

ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again

## Expected results
Same result as with the previous `datasets` version.

## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
  File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
    ds = ds.filter(lambda x: x["id"] in ids)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
    out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
    out = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
    indices = self.map(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
    return self._map_single(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
    out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
    out = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
    return Dataset.from_file(cache_file_name, info=info, split=self.split)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
    return cls(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
    self.info.features = self.info.features.reorder_fields_as(inferred_features)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
    return Features(recursive_reorder(self, other))
  File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
    raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}

Process finished with exit code 1

```

## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0

 Hi ! I guess the caching mechanism should have considered the new `filter` to be different from the old one, and don't use cached results from the old `filter`.
To avoid other users from having this issue we could make the caching differentiate the two, what do you think ?


Backwards compatibility broken for cached datasets that use `.filter()`
 ## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`

Related feature: https://github.com/huggingface/datasets/pull/2836

:question:  This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)

## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.

## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.

2. `pip install datasets==1.11.0` and run the following snippet:

```python
from datasets import load_dataset

ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again

## Expected results
Same result as with the previous `datasets` version.

## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
  File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
    ds = ds.filter(lambda x: x["id"] in ids)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
    out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
    out = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
    indices = self.map(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
    return self._map_single(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
    out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
    out = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
    return Dataset.from_file(cache_file_name, info=info, split=self.split)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
    return cls(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
    self.info.features = self.info.features.reorder_fields_as(inferred_features)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
    return Features(recursive_reorder(self, other))
  File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
    raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}

Process finished with exit code 1

```

## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0

 Well it can cause issue with anyone that updates `datasets` and re-run some code that uses filter, so I'm creating a PR


Backwards compatibility broken for cached datasets that use `.filter()`
 ## Describe the bug
After upgrading to datasets `1.12.0`, some cached `.filter()` steps from `1.11.0` started failing with
`ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}`

Related feature: https://github.com/huggingface/datasets/pull/2836

:question:  This is probably a `wontfix` bug, since it can be solved by simply cleaning the related cache dirs, but the workaround could be useful for someone googling the error :)

## Workaround
Remove the cache for the given dataset, e.g. `rm -rf ~/.cache/huggingface/datasets/librispeech_asr`.

## Steps to reproduce the bug
1. Delete `~/.cache/huggingface/datasets/librispeech_asr` if it exists.

2. `pip install datasets==1.11.0` and run the following snippet:

```python
from datasets import load_dataset

ids = ["1272-141231-0000"]
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
ds = ds.filter(lambda x: x["id"] in ids)
```
3. `pip install datasets==1.12.1` and re-run the code again

## Expected results
Same result as with the previous `datasets` version.

## Actual results
```bash
Reusing dataset librispeech_asr (./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1)
Loading cached processed dataset at ./.cache/huggingface/datasets/librispeech_asr/clean/2.1.0/468ec03677f46a8714ac6b5b64dba02d246a228d92cbbad7f3dc190fa039eab1/cache-cd1c29844fdbc87a.arrow
Traceback (most recent call last):
  File "./repos/transformers/src/transformers/models/wav2vec2/try_dataset.py", line 5, in <module>
    ds = ds.filter(lambda x: x["id"] in ids)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
    out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
    out = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2169, in filter
    indices = self.map(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1686, in map
    return self._map_single(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 185, in wrapper
    out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/fingerprint.py", line 398, in wrapper
    out = func(self, *args, **kwargs)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1896, in _map_single
    return Dataset.from_file(cache_file_name, info=info, split=self.split)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 343, in from_file
    return cls(
  File "./envs/transformers/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 282, in __init__
    self.info.features = self.info.features.reorder_fields_as(inferred_features)
  File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1151, in reorder_fields_as
    return Features(recursive_reorder(self, other))
  File "./envs/transformers/lib/python3.8/site-packages/datasets/features.py", line 1140, in recursive_reorder
    raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'file': Value(dtype='string', id=None), 'text': Value(dtype='string', id=None), 'speaker_id': Value(dtype='int64', id=None), 'chapter_id': Value(dtype='int64', id=None), 'id': Value(dtype='string', id=None)}

Process finished with exit code 1

```

## Environment info
- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 5.0.0

 I just merged a fix, let me know if you're still having this kind of issues :)

We'll do a release soon to make this fix available


load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied
 ## Describe the bug
Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11.

## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset('wiki_bio')
```

## Expected results
It is expected that the dataset downloads without any errors.

## Actual results
PermissionError see trace below:
```
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset
    builder_instance.download_and_prepare(
  File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare
    self._save_info()
  File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__
    next(self.gen)
  File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir
    os.rename(tmp_dir, dirname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9'
```
By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed.

It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue.

## Environment info
- `datasets` version: 1.12.1
- Platform: Windows-10-10.0.22449-SP0
- Python version: 3.8.12
- PyArrow version: 5.0.0

 Hi @daqieq, thanks for reporting.

Unfortunately, I was not able to reproduce this bug:
```ipython
In [1]: from datasets import load_dataset
   ...: ds = load_dataset('wiki_bio')
Downloading: 7.58kB [00:00, 26.3kB/s]
Downloading: 2.71kB [00:00, ?B/s]
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\
1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Downloading: 334MB [01:17, 4.32MB/s]
Dataset wiki_bio downloaded and prepared to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9. Subsequent calls will reuse thi
s data.
```

This kind of error messages usually happen because:
- Your running Python script hasn't write access to that directory
- You have another program (the File Explorer?) already browsing inside that directory


load_dataset using default cache on Windows causes PermissionError: [WinError 5] Access is denied
 ## Describe the bug
Standard process to download and load the wiki_bio dataset causes PermissionError in Windows 10 and 11.

## Steps to reproduce the bug
```python
from datasets import load_dataset
ds = load_dataset('wiki_bio')
```

## Expected results
It is expected that the dataset downloads without any errors.

## Actual results
PermissionError see trace below:
```
Using custom data configuration default
Downloading and preparing dataset wiki_bio/default (download: 318.53 MiB, generated: 736.94 MiB, post-processed: Unknown size, total: 1.03 GiB) to C:\Users\username\.cache\huggingface\datasets\wiki_bio\default\1.1.0\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\load.py", line 1112, in load_dataset
    builder_instance.download_and_prepare(
  File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 644, in download_and_prepare
    self._save_info()
  File "C:\Users\username\.conda\envs\hf\lib\contextlib.py", line 120, in __exit__
    next(self.gen)
  File "C:\Users\username\.conda\envs\hf\lib\site-packages\datasets\builder.py", line 598, in incomplete_dir
    os.rename(tmp_dir, dirname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9.incomplete' -> 'C:\\Users\\username\\.cache\\huggingface\\datasets\\wiki_bio\\default\\1.1.0\\5293ce565954ba965dada626f1e79684e98172d950371d266bf3caaf87e911c9'
```
By commenting out the os.rename() [L604](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L604) and the shutil.rmtree() [L607](https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L607) lines, in my virtual environment, I was able to get the load process to complete, rename the directory manually and then rerun the `load_dataset('wiki_bio')` to get what I needed.

It seems that os.rename() in the `incomplete_dir` content manager is the culprit. Here's another project [Conan](https://github.com/conan-io/conan/issues/6560) with similar issue with os.rename() if it helps debug this issue.

## Environment info
- `datasets` version: 1.12.1
- Platform: Windows-10-10.0.22449-SP0
- Python version: 3.8.12
- PyArrow version: 5.0.0

 Thanks @albertvillanova for looking at it! I tried on my personal Windows machine and it downloaded just fine.

Running on my work machine and on a colleague's machine it is consistently hitting this error. It's not a write access issue because the `.incomplete` directory is written just fine. It just won't rename and then it deletes the directory in the `finally` step. Also the zip file is written and extracted fine in the downloads directory.

That leaves another program that might be interfering, and there are plenty of those in my work machine ... (full antivirus, data loss prevention, etc.). So the question remains, why not extend the `try` block to allow catching the error and circle back to the rename after the unknown program is finished doing its 'stuff'. This is the approach that I read about in the linked repo (see my comments above).

If it's not high priority, that's fine. However, if someone were to write an PR that solved this issue in our environment in an `except` clause, would it be reviewed for inclusion in a future release? Just wondering whether I should spend any more time on this issue.


to_tf_dataset keeps a reference to the open data somewhere, causing issues on windows
 To reproduce:
```python
import datasets as ds
import weakref
import gc

d = ds.load_dataset("mnist", split="train")
ref = weakref.ref(d._data.table)
tfd = d.to_tf_dataset("image", batch_size=1, shuffle=False, label_cols="label")
del tfd, d
gc.collect()
assert ref() is None, "Error: there is at least one reference left"
```

This causes issues because the table holds a reference to an open arrow file that should be closed. So on windows it's not possible to delete or move the arrow file afterwards.

Moreover the CI test of the `to_tf_dataset` method isn't able to clean up the temporary arrow files because of this.

cc @Rocketknight1
 I did some investigation and, as it seems, the bug stems from [this line](https://github.com/huggingface/datasets/blob/8004d7c3e1d74b29c3e5b0d1660331cd26758363/src/datasets/arrow_dataset.py#L325). The lifecycle of the dataset from the linked line is bound to one of the returned `tf.data.Dataset`. So my (hacky) solution involves wrapping the linked dataset with `weakref.proxy` and adding a custom `__del__` to `tf.python.data.ops.dataset_ops.TensorSliceDataset` (this is the type of a dataset that is returned by `tf.data.Dataset.from_tensor_slices`; this works for TF 2.x, but I'm not sure `tf.python.data.ops.dataset_ops` is a valid path for TF 1.x) that deletes the linked dataset, which is assigned to the dataset object as a property. Will open a draft PR soon!


"File name too long" error for file locks
 ## Describe the bug

Getting the following error when calling `load_dataset("gar1t/test")`:

```
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```

## Steps to reproduce the bug

Where the user cache dir (e.g. `~/.cache`) is on a file system that limits filenames to 255 chars (e.g. ext4):

```python
from datasets import load_dataset
load_dataset("gar1t/test")
```

## Expected results

Expect the function to return without an error.

## Actual results

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<python_venv>/lib/python3.9/site-packages/datasets/load.py", line 1112, in load_dataset
    builder_instance.download_and_prepare(
  File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 644, in download_and_prepare
    self._save_info()
  File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 765, in _save_info
    with FileLock(lock_path):
  File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 323, in __enter__
    self.acquire()
  File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 272, in acquire
    self._acquire()
  File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 403, in _acquire
    fd = os.open(self._lock_file, open_mode)
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```

## Environment info

- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
- Python version: 3.9.7
- PyArrow version: 5.0.0

 Hi, the filename here is less than 255
```python
>>> len("_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock")
154
```
so not sure why it's considered too long for your filesystem.
(also note that the lock files we use always have smaller filenames than 255)

https://github.com/huggingface/datasets/blob/5d1a9f1e3c6c495dc0610b459e39d2eb8893f152/src/datasets/utils/filelock.py#L135-L135


"File name too long" error for file locks
 ## Describe the bug

Getting the following error when calling `load_dataset("gar1t/test")`:

```
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```

## Steps to reproduce the bug

Where the user cache dir (e.g. `~/.cache`) is on a file system that limits filenames to 255 chars (e.g. ext4):

```python
from datasets import load_dataset
load_dataset("gar1t/test")
```

## Expected results

Expect the function to return without an error.

## Actual results

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<python_venv>/lib/python3.9/site-packages/datasets/load.py", line 1112, in load_dataset
    builder_instance.download_and_prepare(
  File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 644, in download_and_prepare
    self._save_info()
  File "<python_venv>/lib/python3.9/site-packages/datasets/builder.py", line 765, in _save_info
    with FileLock(lock_path):
  File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 323, in __enter__
    self.acquire()
  File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 272, in acquire
    self._acquire()
  File "<python_venv>/lib/python3.9/site-packages/datasets/utils/filelock.py", line 403, in _acquire
    fd = os.open(self._lock_file, open_mode)
OSError: [Errno 36] File name too long: '<user>/.cache/huggingface/datasets/_home_garrett_.cache_huggingface_datasets_csv_test-7c856aea083a7043_0.0.0_9144e0a4e8435090117cea53e6c7537173ef2304525df4a077c435d8ee7828ff.incomplete.lock'
```

## Environment info

- `datasets` version: 1.12.1
- Platform: Linux-5.11.0-27-generic-x86_64-with-glibc2.31
- Python version: 3.9.7
- PyArrow version: 5.0.0

 Yes, you're right! I need to get you more info here. Either there's something going with the name itself that the file system doesn't like (an encoding that blows up the name length??) or perhaps there's something with the path that's causing the entire string to  be used as a name. I haven't seen this on any system before and the Internet's not forthcoming with any info.


name[Loch Fyne], food[French], customer rating[high], area[riverside], near[The Rice Boat]

For luxurious French food, the Loch Fyne is located by the river next to The Rice Boat.


name[Bibimbap House], food[English], priceRange[moderate], area[riverside], near[Clare Hall]

Bibimbap House is a moderately priced restaurant who's main cuisine is English food. You will find this local gem near Clare Hall in the Riverside area.


name[The Rice Boat], food[French], customer rating[average], area[riverside], familyFriendly[no]

The Rice Boat is an adult French restaurant with high customer rating  located in the Riverside area.


name[Aromi], eatType[coffee shop], food[French], customer rating[low], area[city centre], familyFriendly[no]

In the city centre lies Aromi, a French coffee shop for adults with a low customer rating.


name[The Phoenix], food[Fast food], priceRange[moderate], customer rating[3 out of 5], area[riverside]

The Phoenix is a fast food place located in the riverside area. They have moderate pricing and a customer rating of 3 out of 5.


Mark told Pete many lies about himself, which Pete included in his book. He should have been more skeptical.


The mothers of Arthur and Celeste have come to the town to fetch them. They are very happy to have them back, but they scold them just the same because they ran away.


Mark was close to Mr. Singer 's heels. He heard him calling for the captain, promising him, in the jargon everyone talked that night, that not one thing should be damaged on the ship except only the ammunition, but the captain and all his crew had best stay in the cabin until the work was over


The pony behaved well, sir, and showed no vice; but at last he just threw up his heels and tipped the young gentleman into the thorn hedge. He wanted me to help him out, but I hope you will excuse me, sir, I did not feel inclined to do so.


I poured water from the bottle into the cup until it was full.


Dan had to stop Bill from toying with the injured bird. He is very compassionate.


Sam Goodman 's biography of the Spartan general Xenophanes conveys a vivid sense of the difficulties he faced in his childhood.


Pam's parents came home and found her having sex with her boyfriend, Paul. They were furious about it.


Bob paid for Charlie 's college education, but now Charlie acts as though it never happened. He is very hurt.


Billy cried because Toby wouldn't share his toy.


What is your review of Hidden Figures -LRB- 2016 movie -RRB- ?

What are your impressions of Hidden Figures -LRB- 2017 movie -RRB- ?


Currently , all Supreme Court Justices come from very elite law schools , is it similar for the best lawyers in private practice ?

What 's your type of jungle -LRB- concrete or nature -RRB- and why ?


Why is saltwater taffy candy imported in Austria ?

Why is salt water taffy candy unknown in Japan ?


Who has the better stable of characters , DC or Marvel ?


What is difference between CAT and GMAT in terms of syllabus , admission , difficulty and acceptance ?

What is the difference between the CAT and GMAT syllabus ?


How can I stop being so addicted to my phone ?


How did we get a picture of the Milky Way Galaxy ?

How is the picture of our Milky Way galaxy taken from the outside if we are inside the galaxy ?


Where do APK files get stored in Android Studio ?


What happened to Percival Graves when MACUSA figured out that it 's not him in Fantastic Beast and Where to Find them ?

-LSB- SPOILER -RSB- In Fantastic Beasts and Where to Find Them , why did Gellert Grindelwald hunt the Obscurial ?


Context: Some disagree with such double or triple non-French linguistic origins, arguing that for the word to have spread into common use in France, it must have originated in the French language. The "Hugues hypothesis" argues that the name was derived by association with Hugues Capet, king of France, who reigned long before the Reformation. He was regarded by the Gallicans and Protestants as a noble man who respected people's dignity and lives. Janet Gray and other supporters of the hypothesis suggest that the name huguenote would be roughly equivalent to little Hugos, or those who want Hugo.

Question: What is the theory that this King's name is the origin of "Huguenot" called?

The "Hugues hypothesis"
Hugues hypothesis
"Hugues hypothesis"


Context: Paleoclimatologists measure the ratio of oxygen-18 and oxygen-16 in the shells and skeletons of marine organisms to determine what the climate was like millions of years ago (see oxygen isotope ratio cycle). Seawater molecules that contain the lighter isotope, oxygen-16, evaporate at a slightly faster rate than water molecules containing the 12% heavier oxygen-18; this disparity increases at lower temperatures. During periods of lower global temperatures, snow and rain from that evaporated water tends to be higher in oxygen-16, and the seawater left behind tends to be higher in oxygen-18. Marine organisms then incorporate more oxygen-18 into their skeletons and shells than they would in a warmer climate. Paleoclimatologists also directly measure this ratio in the water molecules of ice core samples that are up to several hundreds of thousands of years old.

Question: How much heavier is oxygen 18 than oxygen 16?


Context: Some of the oldest schools in South Africa are private church schools that were established by missionaries in the early nineteenth century. The private sector has grown ever since. After the abolition of apartheid, the laws governing private education in South Africa changed significantly. The South African Schools Act of 1996 recognises two categories of schools: "public" (state-controlled) and "independent" (which includes traditional private schools and schools which are privately governed[clarification needed].)

Question: What has happened to the public education sector when managed by the government?


Context: The normal force is due to repulsive forces of interaction between atoms at close contact. When their electron clouds overlap, Pauli repulsion (due to fermionic nature of electrons) follows resulting in the force that acts in a direction normal to the surface interface between two objects.:93 The normal force, for example, is responsible for the structural integrity of tables and floors as well as being the force that responds whenever an external force pushes on a solid object. An example of the normal force in action is the impact force on an object crashing into an immobile surface.

Question: What is the force that causes rigid strength in structures?

normal force
normal
normal force
normal force


Question: In what year was the South African Schools Act passed?


Context: The 2007 Lisbon Treaty explicitly recognised fundamental rights by providing in Article 6(1) that "The Union recognises the rights, freedoms and principles set out in the Charter of Fundamental Rights of the European Union of 7 December 2000, as adopted at Strasbourg on 12 December 2007, which shall have the same legal value as the Treaties." Therefore, the Charter of Fundamental Rights of the European Union has become an integral part of European Union law, codifying the fundamental rights which were previously considered general principles of European Union law. In effect, after the Lisbon Treaty, the Charter and the Convention now co-exist under European Union law, though the former is enforced by the European Court of Justice in relation to European Union measures, and the latter by the European Court of Human Rights in relation to measures by member states.

Question: What charter has become an important aspect of EU law?


Context: A job where there are many workers willing to work a large amount of time (high supply) competing for a job that few require (low demand) will result in a low wage for that job. This is because competition between workers drives down the wage. An example of this would be jobs such as dish-washing or customer service. Competition amongst workers tends to drive down wages due to the expendable nature of the worker in relation to his or her particular job. A job where there are few able or willing workers (low supply), but a large need for the positions (high demand), will result in high wages for that job. This is because competition between employers for employees will drive up the wage. Examples of this would include jobs that require highly developed skills, rare abilities, or a high level of risk. Competition amongst employers tends to drive up wages due to the nature of the job, since there is a relative shortage of workers for the particular position. Professional and labor organizations may limit the supply of workers which results in higher demand and greater incomes for members. Members may also receive higher wages through collective bargaining, political influence, or corruption.

Question: What can lead to lower wages for members of labor organizations?


Toileting [QAM]

This value set includes Basic ADL and IADL activities.


Dressing [QAM]


Ambulation [QAM]


Bathing during assessment period [CMS Assessment]


Transferring [OASIS]


Feeding or eating [OASIS]


Power of attorney


Patient Personal advance care plan


Patient Living will


Power of attorney and Living will


i start to feel emotional


i believe feeling duality suffering soul growth tells of an ending or a decline or a change of direction often one associated with emotions and it offers one possible response to that decline or change moving on


i hostage negotiator on her case has her feeling hopeful about her future


im feeling a little dirty


i can cope with his presence without feeling distressed if i can force myself into a quiet and resigned friendship


i had the feeling that it might not have been taken as the truthful and sincere compliment it would have been


i asked some girls what it meant to them to be valued and for the most part the response was that they felt valued when the people around them made them feel valued and treated them in a loving and caring manner


i feel if i completely hated things i d exercise my democratic right speak my mind in what ever ways possible and try to enact a change


i could almost feel her gentle touch in the moonbeam she sent to shine over me he added touching his face dreamily


i woke up very early this morning feeling joyful


4 m e n r s f Z M F h D K G q V k X 8 n b L E q S t L O m O L K v 8 k N K Q U c s 4 4 o s y W g 9 W B P C 8 q 6 r X F a c N e 6 R g A 8 s t J J J V E W T 2 n H 9 C z n W W 8 E g 6 0 A c f 6 H W p K n k F H p 2 9 8 d p T w a g A M K z D t v T D r j m y J V P t b k C p W L k M 1 T s 1 a n k X B n 2 F f U X x j y f I k u 9 Q K u 4 1 d F B 4 X v j b v b v 0 m 7 r l z 6 u y d C W 3 U p y g R O c K s 3 x I N S e N Q 9 8 d w p 9 Z E e k l X g t R V o C s x M D d X 7 l e R 3 G D O m c a F D U w B J p W y r g n G x 9 7 o Z w O c r i v K C A u P 9 z 9 v A a z T 7 j Z v 5 u v U c X A r T 8 H p t k m v t S 7 a l M 2 4 G l s k U B t Q A G g A a 5 p F N N u J B X 8 M 7 4 n p K h Y m r d f g w p l h U Z Q U t y t l 7 r F G 2 0 D 4 B I Z 0 R R v M b q P V E f 2 q P K P k I 3 z P 2 6 Z S x u P a H t l R w O y D g s Y H i t C U q j z z i z k X o D A P q Y L N B a v U I f 3 U m C j 2 G Q p Y z 5 y t e B i 0 O o G x g B D e 2 9 P x l O 6 m Z 9 r N l K n r v 8 a y e 0 C M M L B V v g k 3 6 b P x 0 5 r e Z V L b 6 u E g s I G q o F d s Q h 4 o o g p k L T U Q e F Y J T a Q g g r A R k h h d I I k w a Y X O q 4 h h X 9 j K G m T 8 h 7 S O D d a a 6 Y A V 4 G 9 c n w G e j X U w 4 G F R A 5 3 7 K 2 A f U k L q 1 0 l Q A e z 5 R q v E M C g 1 P 5 G R t 2 J S 3 Y j B l U Y w 9 A M t t 8 u z V v c r u 1 1 s Z c n D H I p q m H S T a B B i t 8 5 n W 8 h a K V i K Z T g P R t h v u S D D C z m 5 i c G S 6 j 5 3 G k s G 8 1 r Z U B n L f U i Z d E h t r j O C t q M h H t 0 Y N g 4 x P q r B D R a g o 6 e 5 i W 4 1 y b 3 F m u g n n r d b T 5 n W g w 5 Y E d k C 1 L S O J w g D e I q i y P N y M P I F N 8 z l o g j w 9 R M h B k V W F 4 9 q 8 O Y L 1 H B O a 5 r 7 y N 1 Z x E X n N C t g S f i K 3 1 u e y X V m Q q O q a b t h v A 8 j Y V I g w i E 4 E S s T g 9 2 7 z I X 6 h d T j 4 o V s k E V c h k g 8 E 7 U p r 4 P r D h N q i 8 y E O h q 0 w 7 G j W 9 x 3 p Q k T K k U z u e T 4 N E z 5 T t k t w D 1 V 4 Z 7 4 t U v l I C U 2 6 o M r 9 T i I x A v 9 K r D f j H Z r q 2 7 4 1 E g 3 C M d j 8

7 1 N D G s U J i s S h V T 2 3 0 c Z U X V n L m z t U h 3 9 Y R o R U 1 4 h L H b Y B 9 D b J J e 5 g 4 M A y 3 4 T s r C Z O 6 F N u Y h B B w i b m e D 6 z x Y 8 j 8 R f e v E K C e e L m s f s 9 n X k g Q y V j 7 t i 5 r W k V Q p p n E p j T 8 B j t Z s l A D 4 7 F w k 2 s L 0 Z D V y 0 H 0 g r d S x b A j a 1 Y b V b 0 x 3 y Q H L G V 9 z 2 w q a w a k d w E 0 L m t n o y C g A k X J a 1 R v 2 a I 9 J h l u r c D 5 C a w d r p W s x v G O T r d q g Z 4 o 1 0 i S x Y B g y I U l D j g 9 l 1 3 0 P 3 a G I h H w Y m u A M Y r R b J 4 M 0 T O p Q 7 a L s R e R Y K V M t A k H e y l Q I f E t 1 l q 3 2 7 M T 2 9 z J B M S L e I j Z p B u K K 9 w R T u z f S 5 I f y b z v D n G 3 H D i u x c t W h N N W i t 4 N 6 E C j Z u 9 5 s f q c f b V Q 1 x B F p v w p G C Z d g y Q T u Y o 8 h 7 f P s 6 3 P O d A 2 Y 8 Q u T O k T Y z 8 l 5 5 w D s 7 O x a A p k 2 9 Y y f A I T B C b A h C 6 0 K O K P p 3 d 1 H X e F u k 3 r k 5 i s b e i x u j o h 5 b 0 X x a t 8 n 7 q R F 9 O t f H g n O h i W w i l q A u 4 N D 0 P V Z I 0 k Z V R y C y 2 y 2 l W q V o B O F w m m h m I O v K B 3 y D X n N P D N B c y q a w e R q 9 w 1 t k 5 U M j G o b 7 6 F R j y 3 8 x t F 2 o t x m 0 T Q T n Q G V v Q 0 T t v R F G G h 2 U R L B W f q 3 T l Y j U n t U 9 7 y e z y b z F a 5 Y l 1 1 a P J V H 0 2 h p p 9 8 Z u X b S Q b q Z n e V M c C L t i U y z j 1 s U 7 L D Q S l S P E 4 R n P 1 E y Q k F o O i 1 J 3 v b V t C x n s R i f s l J H y v 6 z n g S w K 2 T Z o M q u q Q M b k 0 A G 9 x v Q E U l I b W N r x G F Y 6 Q v h A R 6 t 5 N K i 8 U t D K 1 v G k Q V D i O 6 L s h R q 3 r 2 8 V 8 N a G e s i 0 X Z Z q u G y y k m I Z W B e Y l 1 x A u r p h U 5 F t b j e 1 Z X q z 5 k W 6 1 y X 6 p G g P w x Q n Z R 3 F N 6 z b F l d h m e S E t h y l B R S j f e B A n C m t 8 f o G H 7 J M U A k T Q S N R 2 q P Z H s U u s K 0 c R h b j i m x n 1 6 5 g x q 5 L l w i V T n 6 S a S U R M l v d T k Q f u q S v 9 F 5 Q y 4 t H i L 3 x G u n i 8 N W K l f 5 S z n H p N 5 X N y B 4 O w u S 1 9 Y h r b

O P t C M f e M b 9 d O 2 8 I X I e n 8 k S o W e v h s 3 c k 6 Q 0 h w G H X A t X K a x 8 q H e J z K z 7 U v r F 6 m 5 5 R 4 q B L B I C c p V P 4 o G n a q 7 o 6 Z 7 X V s 6 V I x b 1 L 0 a Y y 8 n O 6 j M w t 6 W z C C q u v j 9 f a t V H V 3 a 3 t m v E W J H 8 7 m 7 R E F P j X I t V 2 R T t G F 1 t E r d k o 0 P t y D 8 0 9 1 j 6 2 4 X T u a T K i w h W j k L f 8 C F V T z W k E F 1 n 1 Z 3 P 7 T l R z f 3 w 6 r z L i D C Q B o G x 3 i 5 6 x Z G 4 H U s l T I I s x 8 h N R B O P O N 8 9 S S c n I h R 9 R 7 U q a z N W k A r q 2 J p q A T Q 3 a T c t 5 8 k M u V G b w F P M v I m p C N 7 P 5 i e Y a H q P X 2 T v Q K X z N D V m x H C E 3 0 K k j q Q d b j g Q x E l o T h s l A S p K L U q D w 9 4 4 j v w H w q P L Z c w Z k z o A F c C Q b l k b W K 8 f q z Y n y J V J b n 8 z l P W o W Y y 7 t G D f y N d h 8 R W B J B q Z Y 5 z i M h l s P F u m M O A N s g I e e I y r U z B 4 P d e 9 g 3 k F d c D G S L c y W I A 9 B b 0 f W E 5 J C D M H u m A G V V F s d X 4 o z c o k X E A w U t e 2 4 R u y r 9 r v M z T 8 N X 4 A M b W k V I E d R t p p e u Q q x o N L r g A j r 7 M f Z a x I z w 0 Y E L s F T A p C 3 F 8 K E M 4 s r w b 2 a R j w w f M 5 G U X t W o y b H G h k j 1 r A 7 H z H M O Z Q 5 R J 2 k P J 0 m w e 2 7 C G E T Z X g q K r 3 E S 4 y u G S j B E S N J u 1 c H F V d L d 1 G v o m t e n y n z 8 D 0 G E Y t l 4 V A k J 5 a I x M h 7 9 c 3 B N C K H Q e G Q R i F r 4 E h w 3 q W f V 5 s q 3 U G x v D 3 1 H U q u q t n a b 3 w y D 9 o q x F V s F O J V 1 s t 6 D u d a V D z u 0 F 5 p s S M b X q l j B I L j n J Y t D S G J I l D i H x N R y J 1 X a j k x w U U 5 4 h n T e D I z P q g O J 5 H z i 1 9 G 0 D B W t i l I W o J x y k 1 Z o h 4 0 5 f m o A 7 h 9 I i z H X N z f c a h 9 p S l X n 2 A M i I f C w r H o Z v z v o 9 z e H P k L e B Y f C e z t s F w r j O f 9 b r i G 7 x o N q P L s C q i L x F x P 9 u h 6 y B n 3 U 6 h Q Q F u B m t c 5 A c R n u c V j x P j B n m e H 7 3 8 y X 4 6 H C K 0 5 N i q N H 6 0 3 4 F n V H u M t T a 7 O M p 6 W n


Is it possible that in the distant future, an organism that exists right now on Earth, will evolve to the point that it can be considered intelligent life? Which animal comes the closest?

Answer:
 > Is it possible that in the distant future, an organism that exists right now on Earth, will evolve to the point that it can be considered intelligent life?

Yes, it's possible, but by no means is it a sure thing.  Evolution doesn't have a goal in mind, nor does it have specific end points that are inherently better than others.  Evolution adapts to the environment, and what works works, what doesn't dies off.
 > Which animal comes the closest?

We have a difficult time defining intelligence *within our own species*.  The difficulty goes up astronomically when you look at other species.

Are you talking about technic intelligence?  It's unlikely anything in the ocean will ever develop technology (at least, as far as we can tell - without fire lots of tools are going to be difficult to make).

Social intelligence?  Well, insects seem to have a big advantage there... but they're probably a ways off on the tool front.

etc, etc, etc.

You see the difficulties?

Answer:
Evolution is not directed.

We can't answer this without speculation.


How much can you learn from someone's genome?

I've heard you can learn id someone by looking at their DNA, but what else can you learn if you know what to look for?

Answer:
Well this is fun, we literally just covered this kind of stuff in my advanced molecular biology course.

Your genome will contain variation depending on genetics that has been passed down from your parents.  You may be homozygous for 11 copies of a short-tandem repeat (STR, 2-3 'letters' repeated over and over again in the sequence) where I will be heterozygous for 13 and 8 copies. Your "DNA fingerprint" that the FBI uses involves these regions, when the areas that contain them are amplified by PCR, they show up as different lengths.

Furthermore, there are single-nucleotide-polymorphisms (SNPs) where you may have an A where I have a C (or C-A or T-G or T-A...you get the point).  There are also "indels" - insersions or deletions relative to one genomre or another.  These can serve as markers for disease or other traits, especially if they occur in protein coding genes.  There are a very very large number of these variations, and I could predict (not even close to 100% certainty, though) some traits about you as well as heritable diseases you may carry.  The debate on nature/nurture is how certain could I be given your genotype?

[This database](_URL_0_) is called Online Mendellian Inheritance in Man and catalogs diseases/traits and contains a *wealth* of SNP and indel data about them.  Doing some mining, you can find tables like [these](_URL_1_) that will list all known variants for a gene and link to more information about them.  This example is the Von Willebrands Factor, mutations of which cause Von Willebrands Disease which is a mild bleeding disorder.  I don't know your background, but this site contains a lot of very technical information.

You may have heard of [23andMe](_URL_2_) which is a commercial service that will assay your genome for specific markers as well.

EDIT: If your family has submitted their genomes to a database as well, we could ID them as well


Why can a person safely receive platelets donated by anyone, but can only receive a particular type of whole blood?

Answer:
Platelets don't have antigens (the things antibodies recognize) on them. What might be a good way to remember this is that they're not made from red blood cells where the ABO blood group antigens are, they're shed from cells in the bone marrow called megakaryocytes.

That's not to say platelets are JUST floating bits of cytoplasm. They've got glycoproteins on the outside to recognize various signals that, if received, may then induce them to release granules filled with clotting factors.

But why don't people have antibodies to these glycoproteins? People have antibodies against certain glycoproteins on red blood cells, right? Yes, they do. However, basically EVERYONE has the same platelet glycoproteins. Developing an immune reaction against them would almost certainly mean death. Super bad thrombocytopenia (low platelets) AND what's basically a bad transfusion reaction, which can kill a person in minutes.

That being said, there are bleeding disorders where people lack some of these platelet factors (von Willebrand disease, for example). That's different from their bodies actively attacking any cell that has them, and they have problems with clotting and blood vessel damage, for the most part.


Why do the Russian scientists have to wait till December to study the water they took from Lake Vostok? (Lake under Antartica)

Answer: Vostok Station is one of the most [inhospitable places for humans to work](_URL_0_).  December is the Antarctic summer, so the weather will be better, temperatures warmer, and up to 24 hours of daylight.


Do different types of wood have different specific heats?

Answer: Wood in general is a very complicated material.  The specific heat of any particular piece of wood is going to be dominated by the amount of water in that wood.  So it can vary significantly not only from species to species but also within species according to what treatment, if any, the wood has undergone.


Can you transmit the flu through semen? What about sweat?

Got into an interesting discussion with the wife about whether she could get my flu from a little WHOOPEE.  Then I went to play hoops with friends and was wondering if my sweat could transmit it as well?

Answer: It is primarily an infection involving the upper respiratory tract. The virus is primarily shed through coughing/sneezing. The likelihood of semen or sweat containing the virus is low and unless those fluids are inhaled it wouldn't cause an infection.


Why is there so much Carbon-14 in these fossils?

I searched this sub for similar posts.  There were some close matches but nothing regarding fossils with such a high concentration of C14.

Here is the article: _URL_0_

This topic was discussed over in /r/DebateAChristian, and I was asked to pose this question to the experts.

Thanks in advance.

Answer: That's quite a lot to read over for so little potential gain. Could you be more specific?

Answer:
There's a lot of crap on that page.

First, carbon dating doesn't work for things like dinosaur fossils.  They're too old.

The number 22,380 has no reference next to it so I'm not sure which reference at the bottom they're referring to.

The premise of the article is that in 2005 a fossil was dated to 20-30k years.  None of their references seems to point to this event, nor does Google come up with anything that's not a blog or some anti-evolution web site.  Hugh Miller comes up a few times, he's apparently a creationist.

There's nothing on that page that can be responded to without vomiting.


As the needle approaches the centre of a record, its speed increases, right? Are the grooves cut differently towards the middle of a record to account for this?

Is it magic or is it science?

Edit: [6], in case you were wondering

Answer: The grooves aren't intentionally cut differently, but the wavelength representation is longer near the edge compared to the center because the speed of the track increases from the center to the edge. Since the grooves are cut directly into the recording material, no external adjustment is necessary, since it's always going to be a 1 to 1 correspondence when played back at the same speed it was cut.

Answer:
Early floppy-drive computers included some models which varied the speed of the disc drive, as the head moved across the radial distance. This is constant linear velocity, as opposed to constant angular velocity.

LP cutting heads are often linear track. The cutting needle is on a screwshaft. LP reading heads are typically designed to pivot. Audiophiles used to argue if this mattered, if the parallelogram of forces on the needle didn't accurately track what was cut. Some LP players therefore had linear drive reader heads, but not all golden ears agree they sound better.

Answer:
 >  As the needle approaches the centre of a record, its speed increases, right?

Incorrect.

The record always spins at, say, 33-1/3 rpm. The diameter of a standard LP is 30 cm, so when the needle is at the outer edge, it passes along about 90 cm of groove for each revolution, or about 52 cm per second. If the diameter of the label is about 10 cm, then when the needle gets in to the center, it passes along only about 30 cm per revolution, or 17 cm per second.


In a chemical reaction, if the product has a lower energy than the reactant, why doesn't all reactant convert to product?

If there is a reaction: A-- > B and B is more stable or has a lower energy than A, then the equilibrium position will typically be more B than A. But, why doesn't all A convert to B if B has lower energy?

Answer: Reactions have an [activation energy](_URL_0_) associated that acts as a barrier from all reactants rapidly and spontaneously turning into products. That is, there requires some extra energy put into the reaction before it can proceed. Commonly this is heat energy - hence reactions occurring faster at higher temperatures.


Why is there such a thing as "critical mass" for a radioactive material? Why couldn't the chain reaction sustain itself with less mass than the critical amount? How is this mass calculated?

Answer:
The reason for the chain reaction in the first place, is a chance for a neutron emitted by an atom to hit another atom. This event in turn emits even more neutrons. If those manage to hit an atom, the chain will continue.

Critical mass ensures that emitted neutrons do not just miss everything and fly away, but they keep hitting more atoms (because there are enough atoms around). This gives you a sustainable chain reaction.

There is no simple formula for calculating the exact value of the critical mass. It depends on cross section of the material, energy of emitted neutrons, presence of neutron reflecting shield around the material etc. Figuring out the critical mass value for a particular material is basically what physicists get paid for.

Answer:
Fission results in the release of 2 to 3 free neutrons. To sustain a critical chain reaction, on average, one of these neutrons should be captured by a fissile nucleus and cause it to fission.

So what you need to understand is the parameters that affect how likely it is for a free neutron to be captured in this way.

One important parameter is the shape of the material.  If a neutron escapes the material it is lost from the system and doesn't contribute to the chain reaction. This is called leakage.  A sphere is the most efficient shape as it has the smallest surface area from which leakage will occur for a given volume.  We also want to maximise the density of the material as this will also minimise the surface area for a given mass.

The larger the mass of the sphere the less likely it is a neutron will escape i.e. a neutron will on average have to pass by more fissile nuclei before it can escape the edge of the sphere.  For each pure fissile material of full density in a vacuum there is an ideal spherical mass where a just critical chain reaction will occur.  Any less material and there will be too much leakage and the system will be subcritical.

This critical mass can be reduced by adding a reflector around the fissile material.  Beryllium is an excellent reflector, as it has a high neutron scatter cross section and a low neutron capture cross section (I'll come back to these terms in a bit).  By adding a thick shell of beryllium around our spherical critical mass we minimise leakage and thus reduce our critical mass.

The next thing to understand is how neutron capture or scatter cross sections vary with neutron energy.  Cross sections are measured in barns, a unit of area.  The bigger the cross section, the more likely it is that a neutron will be absorbed or scattered when its comes into proximity with a nucleus. After a fission the free neutrons are "fast" and have an energy in the MeV range.  By slowing down neutrons to a "thermal" energy in the eV range the cross sections increase significantly and neutrons can more easily captured.  So if we reduce the average neutron energy then we need on average fewer interactions between a neutron and fissile nuclei before a capture occurs.  In which case the volume needed for a chain reaction reduces further.  Slowing down neutrons is achieved by including a "moderator".  This is a material with a low atomic mass which reduces the energy of a neutron by elastically scattering it.  This is analogous to a pool ball being slowed down by multiple collisions with other balls by transferring some of its energy to them.  The best moderator is one with a similar mass to a neutron as momentum transfer is most efficient at equal mass.  A secondary factor is that the moderator should not capture too many neutrons.  Hydrogen-1 is by far the most effective moderator.  The next best, deuterium, is much less efficient at absorbing momentum energy.   Again we want to minimise the size of our sphere so we want a material with a high hydrogen density.  Water has a good hydrogen density, but polythene is even better.

Side note: Moderation also has a secondary benefit in that thermal fission produces slightly more neutrons per fission than fast fission on average.  This further improves our balance of neutrons available for the chain reaction.

The next point to make is that a nucleus can absorb a neutron without contributing to fission.  This is called parasitic absorption.  This can happen with the fissile nuclei itself, which is unavoidable, with the moderator and the reflector and also with any impurities that may be present.  To minimise this we want to exclude any impurities and to use just enough moderator mixed in a ideal way with the fissile material (a homogeneous mix for high enriched uranium and plutonium or a lattice for very low enriched uranium).

Taking all of that into account we can now design our system with a minimum critical mass.  Most minimum critical masses reported will be for pure u-233, u-235, pu-239 and pu-241 mixed homogeneously at maximum density with an ideal concentration of polythene, surrounded by beryllium.

The differences between the masses for each fissile isotope are due to there different capture-fission and capture-parasitic absorption cross sections and the differences in the average number of free neutrons produced per fission.

Technically there are some ways we could produce an even smaller minimum critical mass.  In theory beryllium hydride is an even better moderator than polythene and could result in a critical mass of as little as 87 grams for pu-239.   Additionally some of the higher transuranics are also fissile and have very very small minimum critical masses (a few grams, maybe less).  Both of these cases are a bit academic and not really relevant in industrial settings (e.g. Where want want to know the minimum critical mass for safety control purposes).

Edit: How is it calculated? These days we use computer software to very accurately model a system.  The most accurate tools are Monte Carlo models that individually model the fate of many postulated neutrons until the statistical error is negligible.  These models are validated against a library of test data.  The better validated the data, the more accurate the model.  There are analytical approaches that can be used, with formulas to estimate the effects of geometry, moderation, etc (try googling geometric and material buckling as an example).  These are rarely used outside of a classroom as the software models are more effective and widely available.


from django.conf import settings
from django.core.mail import send_mail
from django.shortcuts import render

from .forms import ContactForm, SignUpForm
from .models import SignUp

# Create your views here.
def home(request):
	title = 'Sign Up Now'
	form = SignUpForm(request.POST or None)
	context = {
		"title": title,
		"form": form
	}
	if form.is_valid():
		#form.save()
		#print request.POST['email'] #not recommended
		instance = form.save(commit=False)

		full_name = form.cleaned_data.get("full_name")
		if not full_name:
			full_name = "New full name"
		instance.full_name = full_name
		# if not instance.full_name:
		# 	instance.full_name = "Justin"
		instance.save()
		context = {
			"title": "Thank you"
		}

	if request.user.is_authenticated() and request.user.is_staff:
		#print(SignUp.objects.all())
		# i = 1
		# for instance in SignUp.objects.all():
		# 	print(i)
		# 	print(instance.full_name)
		# 	i += 1

		queryset = SignUp.objects.all().order_by('-timestamp') #.filter(full_name__iexact="Justin")
		#print(SignUp.objects.all().order_by('-timestamp').filter(full_name__iexact="Justin").count())
		context = {
			"queryset": queryset
		}

	return render(request, "home.html", context)

def contact(request):
	title = 'Contact Us'
	title_align_center = True
	form = ContactForm(request.POST or None)
	if form.is_valid():
		# for key, value in form.cleaned_data.iteritems():
		# 	print key, value
		# 	#print form.cleaned_data.get(key)
		form_email = form.cleaned_data.get("email")
		form_message = form.cleaned_data.get("message")
		form_full_name = form.cleaned_data.get("full_name")
		# print email, message, full_name
		subject = 'Site contact form'
		from_email = settings.EMAIL_HOST_USER
		to_email = [from_email, 'youotheremail@email.com']
		contact_message = "%s: %s via %s"%(
				form_full_name,
				form_message,
				form_email)
		some_html_message = """

hello

		"""
		send_mail(subject,
				contact_message,
				from_email,
				to_email,
				html_message=some_html_message,
				fail_silently=True)

	context = {
		"form": form,
		"title": title,
		"title_align_center": title_align_center,
	}
	return render(request, "forms.html", context)