Skip to content

Commit

Permalink
Merge branch 'gh-pages' into create-beginners-guide-to-twitter-data
Browse files Browse the repository at this point in the history
  • Loading branch information
spapastamkou committed Nov 4, 2019
2 parents 694d894 + 2f104a7 commit 7d5bd7f
Show file tree
Hide file tree
Showing 43 changed files with 396 additions and 359 deletions.
4 changes: 4 additions & 0 deletions _data/snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ lesson:
en: lessons
es: lecciones
fr: leçons
donate:
en: Support PH
es: Apoyar PH
fr: Soutenir PH

# Included in the lesson.html layout when a lesson has been marked as retired, and is not to be displayed on the main directory.
retired:
Expand Down
5 changes: 4 additions & 1 deletion _layouts/lesson.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ <h2>{% include author.html orcid = true %}</h2>
</p>
</div>
{% endif %}
<div class="open-license">
<div class="open-license mr-5">
<p><a href="https://creativecommons.org/licenses/by/4.0/deed.en"><i class="fas fa-lock-open"></i> CC-BY
4.0</a></p>
</div>
<div class="donate mr-5">
<p><a href="https://programminghistorian.org{{ site.data.snippets.menu-contribute-support[page.lang].link}}"><i class="fas fa-credit-card"></i> {{ site.data.snippets.donate[page.lang] }}</a></p>
</div>
</div>
</div>
</div>
Expand Down
95 changes: 95 additions & 0 deletions archive/2019-11_PH-Archive.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
2018
2019
2019-11_PH-Archive.txt
ProgHistLtd

./2018:
2018-10_BA-workshop

./2018/2018-10_BA-workshop:
2 - Grant Application.docx

./2019:
2019-05_Roy-Rosenzweig-prize
2019-07_IAA-impactmanager
2019-09_Team-Survey
2019-09_open-publishing-awards
2019-10_BritishAcademy_workshop-bid

./2019/2019-05_Roy-Rosenzweig-prize:
Roy Rosenzweig Prize.docx

./2019/2019-07_IAA-impactmanager:
2019-09-23_JB-PH_Fast track engagement fund application form - v5.docx

./2019/2019-09_Team-Survey:
PH Team survey - Sept 2019.docx

./2019/2019-09_open-publishing-awards:
open_publishing_awards_2019.docx

./2019/2019-10_BritishAcademy_workshop-bid:
2019-10-23_submitted-WW20200190.pdf

./ProgHistLtd:
2019
AGM
Board-of-Directors-Meetings
Register-of-Members

./ProgHistLtd/2019:
2019-09
2019-10

./ProgHistLtd/2019/2019-09:
incorporation

./ProgHistLtd/2019/2019-09/incorporation:
certificate
memo-of-association

./ProgHistLtd/2019/2019-09/incorporation/certificate:
061-884384_20190906_12192946.pdf

./ProgHistLtd/2019/2019-09/incorporation/memo-of-association:
Articles of Association v5.doc
Articles of Association v5.pdf
MEMANDARTS_20190905_114736658.pdf
Table C Articles.pdf

./ProgHistLtd/2019/2019-10:
Board Letters
Membershp Letters

./ProgHistLtd/2019/2019-10/Board Letters:
ProgHist Board Invitation - Melton.pdf
ProgHist Board Invitation - Papastamkou.pdf
ProgHist Board Invitation - Quiroga.pdf

./ProgHistLtd/2019/2019-10/Membershp Letters:
ProgHist Member Invitation - Afanador Llach.pdf
ProgHist Member Invitation - Gayol.pdf
ProgHist Member Invitation - Grandjean.pdf
ProgHist Member Invitation - Isasi.pdf
ProgHist Member Invitation - Laramée.pdf
ProgHist Member Invitation - LeBlanc.pdf
ProgHist Member Invitation - Lincoln.pdf
ProgHist Member Invitation - Ortiz.pdf
ProgHist Member Invitation - Parr.pdf
ProgHist Member Invitation - Rojas Castro.pdf
ProgHist Member Invitation - Walsh.pdf

./ProgHistLtd/AGM:

./ProgHistLtd/Board-of-Directors-Meetings:
2019

./ProgHistLtd/Board-of-Directors-Meetings/2019:
10-2019

./ProgHistLtd/Board-of-Directors-Meetings/2019/10-2019:
2019-10-03_ProgHistLtd-BoD.docx

./ProgHistLtd/Register-of-Members:
2019-10_ProgHistLtd_Register-of-Members.docx
2019-10_ProgHistLtd_Register-of-Members.pdf
Binary file modified assets/python-lessons1.zip
Binary file not shown.
Binary file modified assets/python-lessons2.zip
Binary file not shown.
Binary file modified assets/python-lessons3.zip
Binary file not shown.
Binary file modified assets/python-lessons4.zip
Binary file not shown.
Binary file modified assets/python-lessons5.zip
Binary file not shown.
Binary file modified assets/python-lessons6.zip
Binary file not shown.
Binary file modified assets/python-lessons7.zip
Binary file not shown.
Binary file modified assets/python-lessons8.zip
Binary file not shown.
Binary file modified assets/python-lessons9.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion en/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The review process is an integral component of a collaborative, productive, and


## Open Source
The _Programming Historian_ team is committed to open source values. All contributed lessons make use of open source programming languages and software whenever possible. This policy is meant to minimize costs for all parties, and to allow the greatest possible level of participation. We believe everyone should be able to benefit from these tutorials, not just those with large research budgets for expensive proprietary software. Since 2016, a citable version of the _Programming Historian_ project has been deposited on [Zenodo](https://zenodo.org/). The 2018 deposit is available at [doi.org/10.5281/zenodo.1477854](https://doi.org/10.5281/zenodo.1477854).
The _Programming Historian_ team is committed to open source values. All contributed lessons make use of open source programming languages and software whenever possible. This policy is meant to minimize costs for all parties, and to allow the greatest possible level of participation. We believe everyone should be able to benefit from these tutorials, not just those with large research budgets for expensive proprietary software. Since 2016, a citable version of the _Programming Historian_ project has been deposited on [Zenodo](https://zenodo.org/). The 2019 deposit is available at [doi.org/10.5281/zenodo.3525082](https://doi.org/10.5281/zenodo.3525082).


## Gold Open Access
Expand Down
2 changes: 1 addition & 1 deletion en/lessons/analyzing-documents-with-tfidf.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ The Scikit-Learn `TfidfVectorizer` has several internal settings that can be cha

#### 1. stopwords

In my code, I used `python stopwords=None` but `python stopwords='english'` is available. This setting will filter out words using a [preselected list](https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_extraction/stop_words.py) of high frequency function words such as 'the', 'to', and 'of'. Depending on your settings, many of these terms will have low __tf-idf__ scores regardless because they tend to be found in all documents. For a discussion of some publicly available stop word lists (including Scikit-Learn's), see ["Stop Word Lists in Free Open-source Software Packages"](https://aclweb.org/anthology/W18-2502).
In my code, I used `python stopwords=None` but `python stopwords='english'` is available. This setting will filter out words using a [preselected list](https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_extraction/_stop_words.py) of high frequency function words such as 'the', 'to', and 'of'. Depending on your settings, many of these terms will have low __tf-idf__ scores regardless because they tend to be found in all documents. For a discussion of some publicly available stop word lists (including Scikit-Learn's), see ["Stop Word Lists in Free Open-source Software Packages"](https://aclweb.org/anthology/W18-2502).

#### 2. min_df, max_df

Expand Down
2 changes: 1 addition & 1 deletion en/lessons/code-reuse-and-modularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ debug."
next: working-with-web-pages
previous: working-with-text-files
categories: [lessons, original-ph, python]
python_warning: true
python_warning: false
redirect_from: /lessons/code-reuse-and-modularity
---

Expand Down
19 changes: 11 additions & 8 deletions en/lessons/counting-frequencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ authors:
- Adam Crymble
reviewers:
- Jim Clifford
- Frederik Elwert
editors:
- Miriam Posner
difficulty: 2
Expand All @@ -17,7 +18,7 @@ topics: [python]
abstract: "Counting the frequency of specific words in a list can provide illustrative data. This lesson will teach you Python's easy way to count such frequencies."
next: creating-and-viewing-html-files-with-python
previous: normalizing-data
python_warning: true
python_warning: false
redirect_from: /lessons/counting-frequencies
---

Expand Down Expand Up @@ -65,7 +66,7 @@ for w in wordlist:
print("String\n" + wordstring +"\n")
print("List\n" + str(wordlist) + "\n")
print("Frequencies\n" + str(wordfreq) + "\n")
print("Pairs\n" + str(zip(wordlist, wordfreq)))
print("Pairs\n" + str(list(zip(wordlist, wordfreq))))
```

Here, we start with a string and split it into a list, as we’ve done
Expand Down Expand Up @@ -122,7 +123,7 @@ wordfreq = [wordlist.count(w) for w in wordlist] # a list comprehension
print("String\n" + wordstring +"\n")
print("List\n" + str(wordlist) + "\n")
print("Frequencies\n" + str(wordfreq) + "\n")
print("Pairs\n" + str(zip(wordlist, wordfreq)))
print("Pairs\n" + str(list(zip(wordlist, wordfreq))))
```

If you study this list comprehension carefully, you will discover that
Expand Down Expand Up @@ -150,6 +151,7 @@ access first a particular string in the list, and then a particular
character within that string. Study the examples below.

``` python

s = 'hello world'
print(s[0])
-> h
Expand Down Expand Up @@ -178,6 +180,7 @@ from it. You can, however, look them up by using a key (hence the name
"dictionary"). Study the following example.

``` python

d = {'world': 1, 'hello': 0}
print(d['hello'])
-> 0
Expand Down Expand Up @@ -215,7 +218,7 @@ of pairs. Copy the following and add it to the `obo.py` module.

def wordListToFreqDict(wordlist):
wordfreq = [wordlist.count(p) for p in wordlist]
return dict(zip(wordlist,wordfreq))
return dict(list(zip(wordlist,wordfreq)))
```

We are also going to want a function that can sort a dictionary of
Expand All @@ -242,11 +245,11 @@ continuing.
``` python
#html-to-freq.py

import urllib2, obo
import urllib.request, urllib.error, urllib.parse, obo

url = 'http://www.oldbaileyonline.org/browse.jsp?id=t17800628-33&div=t17800628-33'

response = urllib2.urlopen(url)
response = urllib.request.urlopen(url)
html = response.read()
text = obo.stripTags(html).lower()
wordlist = obo.stripNonAlphaNum(text)
Expand Down Expand Up @@ -363,12 +366,12 @@ and execute it.
``` python
# html-to-freq-2.py

import urllib2
import urllib.request, urllib.error, urllib.parse
import obo

url = 'http://www.oldbaileyonline.org/browse.jsp?id=t17800628-33&div=t17800628-33'

response = urllib2.urlopen(url)
response = urllib.request.urlopen(url)
html = response.read()
text = obo.stripTags(html).lower()
fullwordlist = obo.stripNonAlphaNum(text)
Expand Down
2 changes: 1 addition & 1 deletion en/lessons/creating-and-viewing-html-files-with-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract: "Here you will learn how to create HTML files with Python scripts, and
how to use Python to automatically open an HTML file in Firefox."
next: output-data-as-html-file
previous: counting-frequencies
python_warning: true
python_warning: false
redirect_from: /lessons/creating-and-viewing-html-files-with-python
---

Expand Down
Loading

0 comments on commit 7d5bd7f

Please sign in to comment.