Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed docs/PythonIntro.zip
Binary file not shown.
Binary file removed docs/Python_asASecondLanguage_overview.pdf
Binary file not shown.
Binary file removed docs/Python_intro-builtin_datatypes.pdf
Binary file not shown.
Binary file removed docs/Python_intro-control_flow.pdf
Binary file not shown.
Binary file removed docs/Python_intro-dataContainers.pdf
Binary file not shown.
Binary file removed docs/Python_intro-functions.pdf
Binary file not shown.
Binary file removed docs/Python_intro-io.pdf
Binary file not shown.
Binary file removed docs/Python_intro-syntax.pdf
Binary file not shown.
Binary file removed docs/Python_intro-userEnvironments.pdf
Binary file not shown.
Binary file removed docs/Python_intro-variables_operators.pdf
Binary file not shown.
Binary file removed docs/python_install_miniforge.pdf
Binary file not shown.
2,170 changes: 2,170 additions & 0 deletions scripts/GJB_data_types_recap.ipynb

Large diffs are not rendered by default.

1,001 changes: 1,001 additions & 0 deletions scripts/MOCK_DATA.csv

Large diffs are not rendered by default.

1,001 changes: 1,001 additions & 0 deletions scripts/MOCK_DATA_out.csv

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions scripts/accum_pattern_multiple-scrabble.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 6 16:11:59 2019

@author: http://ice-web.cc.gatech.edu/ce21/1/static/audio/static/pip/Dictionaries/dictionary_accum.html#scarlet.txt
"""

f = open('study_in_scarlet.txt', 'r', encoding='utf8')
txt = f.read()
f.close()
# now txt is one long string containing all the characters
x = {} # start with an empty dictionary
for c in txt:
if c not in x:
# we have not seen this character before, so initialize a counter for it
x[c] = 0

#whether we've seen it before or not, increment its counter
x[c] = x[c] + 1

# build a second dictionary, containing the scrabble scores for individual characters
# calculate the scrabble score of your text
letter_values = {'a': 1, 'b': 3, 'c': 3, 'd': 2, 'e': 1, 'f':4, 'g': 2, 'h':4, 'i':1, 'j':8, 'k':5, 'l':1, 'm':3, 'n':1, 'o':1, 'p':3, 'q':10, 'r':1, 's':1, 't':1, '':1, 'v':8, 'w':4, 'x':8, 'y':4, 'z':10}

tot = 0
for y in x:
if y in letter_values:
tot = tot + letter_values[y] * x[y]

print('total scrabble score = ', tot)
22 changes: 22 additions & 0 deletions scripts/accum_pattern_multiple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
h# -*- coding: utf-8 -*-
"""
Created on Thu Jun 6 15:31:20 2019

@author: http://ice-web.cc.gatech.edu/ce21/1/static/audio/static/pip/Dictionaries/dictionary_accum.html#scarlet.txt
"""

f = open('study_in_scarlet.txt', 'r', encoding="utf8")
txt = f.read()
f.close()
# now txt is one long string containing all the characters
x = {} # start with an empty dictionary
for c in txt:
if c not in x:
# we have not seen this character before, so initialize a counter for it
x[c] = 0

#whether we've seen it before or not, increment its counter
x[c] = x[c] + 1

for c in x.keys():
print(c + ": " + str(x[c]) + " occurrences")
13 changes: 13 additions & 0 deletions scripts/accum_pattern_single.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 6 14:47:11 2019

@author: http://ice-web.cc.gatech.edu/ce21/1/static/audio/static/pip/Iteration/iteration.html
"""

nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
accum = 0
for w in nums:
accum = accum + w
print(accum)

33 changes: 33 additions & 0 deletions scripts/accum_pattern_single_text.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 6 15:02:14 2019

@author: http://ice-web.cc.gatech.edu/ce21/1/static/audio/static/pip/Dictionaries/dictionary_accum.html#scarlet.txt
"""

#f = open('study_in_scarlet.txt', 'r', encoding="utf8")
f = open('Data\patients.txt', 'r')
txt = f.read()
# now txt is one long string containing all the characters
t_count = 0 #initialize the accumulator variable

# check the number of occurences of t
for ch in txt:
if ch == 't':
t_count = t_count + 1 #increment the counter
print("t: " + str(t_count) + " occurrences")
f.close()


# a more elaborted loop for 2 characters
# a lot of elif's required to test for all 26 characters
t_count = 0 #initialize the accumulator variable
s_count = 0 # initialize the s counter accumulator as well
for ch in txt:
if ch == 't':
t_count = t_count + 1 #increment the t counter
elif ch == 's':
s_count = s_count + 1
print("t: " + str(t_count) + " occurrences")
print("s: " + str(s_count) + " occurrences")
f.close()
5 changes: 5 additions & 0 deletions scripts/actors.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
First Name,Last Name,Date of Birth
Tom,Cruise,"July 3, 1962"
Bruce,Willis,"March 19, 1955"
Morgan,Freeman,"June 1, 1937"
John,Wayne,"May 26, 1907"
Loading