Skip to content

Commit 1c11d2c

Browse files
committed
Autobuild
1 parent e9b61ea commit 1c11d2c

20 files changed

Lines changed: 756 additions & 716 deletions

File tree

docs/exercises/answers/Exercise2_answers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ <h4 class="date"><a href="https://rockefelleruniversity.github.io/Intro_To_Pytho
645645
between the two?</li>
646646
</ul>
647647
<div class="sourceCode" id="cb48"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb48-1"><a href="#cb48-1" tabindex="-1"></a>my_set1.intersection(my_set2) </span></code></pre></div>
648-
<pre><code>## {&#39;PKM&#39;, &#39;MCM10&#39;, &#39;GSS&#39;}</code></pre>
648+
<pre><code>## {&#39;GSS&#39;, &#39;MCM10&#39;, &#39;PKM&#39;}</code></pre>
649649

650650

651651

docs/exercises/exercises/Exercise2_exercise.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ <h4 class="date"><a href="https://rockefelleruniversity.github.io/Intro_To_Pytho
480480
<li>These are genes of interest from two experiments. What genes overlap
481481
between the two?</li>
482482
</ul>
483-
<pre><code>## {&#39;PKM&#39;, &#39;MCM10&#39;, &#39;GSS&#39;}</code></pre>
483+
<pre><code>## {&#39;GSS&#39;, &#39;MCM10&#39;, &#39;PKM&#39;}</code></pre>
484484

485485

486486

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ <h2>Course Overview</h2>
485485
<p><br></p>
486486
<div id="course-integrity" class="section level3">
487487
<h3>Course Integrity</h3>
488-
<p><strong>This course is compiled automatically on <em>2026-01-22</em>
488+
<p><strong>This course is compiled automatically on <em>2026-01-26</em>
489489
</strong> <br> <a
490490
href="https://github.com/RockefellerUniversity/Intro_To_Python/actions/workflows/selfTest.yml"><img
491491
src="https://github.com/RockefellerUniversity/Intro_To_Python/actions/workflows/selfTest.yml/badge.svg"

docs/presentations/r_code/Session1.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -245,15 +245,15 @@ if(params$isSlides == "yes"){
245245
## list2
246246
## list3
247247

248-
## biglist = my_strs + my_ints
248+
## biglist = my_ints + my_strs
249249
## biglist
250250

251-
## biglist = my_strs
252-
## biglist += my_ints
253-
## biglist
251+
## biglist2 = [1,2,3,4,5]
252+
## biglist2 += my_strs
253+
## biglist2
254254

255-
## biglist = my_strs * 5
256-
## biglist
255+
## biglist3 = my_strs * 5
256+
## biglist3
257257

258258
## my_strs.append('f')
259259
## my_strs
@@ -267,12 +267,12 @@ if(params$isSlides == "yes"){
267267
## my_strs.remove('c')
268268
## my_strs
269269

270+
## my_strs.index('c')
271+
270272
## del my_strs[3]
271273
## my_strs
272274

273-
## my_strs.index('c')
274-
275-
## my_strs.append("f")
275+
## "a" in my_strs
276276

277277
## my_list = [1,4,9,4,11,12,6]
278278
## my_list.sort()

docs/presentations/singlepage/Session1.html

Lines changed: 272 additions & 266 deletions
Large diffs are not rendered by default.

docs/presentations/singlepage/Session2.html

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,111 +1634,111 @@ <h2>Reading/writing files</h2>
16341634
Gene_a
16351635
</td>
16361636
<td style="text-align:right;">
1637-
4.172365
1637+
3.166541
16381638
</td>
16391639
<td style="text-align:right;">
1640-
4.036224
1640+
4.886880
16411641
</td>
16421642
<td style="text-align:right;">
1643-
3.459136
1643+
4.606144
16441644
</td>
16451645
</tr>
16461646
<tr>
16471647
<td style="text-align:left;">
16481648
Gene_b
16491649
</td>
16501650
<td style="text-align:right;">
1651-
4.666711
1651+
2.342709
16521652
</td>
16531653
<td style="text-align:right;">
1654-
2.498400
1654+
6.603740
16551655
</td>
16561656
<td style="text-align:right;">
1657-
5.089345
1657+
4.268355
16581658
</td>
16591659
</tr>
16601660
<tr>
16611661
<td style="text-align:left;">
16621662
Gene_c
16631663
</td>
16641664
<td style="text-align:right;">
1665-
3.108345
1665+
4.147176
16661666
</td>
16671667
<td style="text-align:right;">
1668-
4.798711
1668+
3.900358
16691669
</td>
16701670
<td style="text-align:right;">
1671-
4.562888
1671+
4.833181
16721672
</td>
16731673
</tr>
16741674
<tr>
16751675
<td style="text-align:left;">
16761676
Gene_d
16771677
</td>
16781678
<td style="text-align:right;">
1679-
3.188671
1679+
4.368126
16801680
</td>
16811681
<td style="text-align:right;">
1682-
4.394748
1682+
3.428708
16831683
</td>
16841684
<td style="text-align:right;">
1685-
2.946436
1685+
5.866756
16861686
</td>
16871687
</tr>
16881688
<tr>
16891689
<td style="text-align:left;">
16901690
Gene_e
16911691
</td>
16921692
<td style="text-align:right;">
1693-
9.470627
1693+
12.240208
16941694
</td>
16951695
<td style="text-align:right;">
1696-
10.896368
1696+
11.012076
16971697
</td>
16981698
<td style="text-align:right;">
1699-
10.461258
1699+
10.342122
17001700
</td>
17011701
</tr>
17021702
<tr>
17031703
<td style="text-align:left;">
17041704
Gene_f
17051705
</td>
17061706
<td style="text-align:right;">
1707-
10.469845
1707+
10.308645
17081708
</td>
17091709
<td style="text-align:right;">
1710-
11.160107
1710+
9.751059
17111711
</td>
17121712
<td style="text-align:right;">
1713-
11.321652
1713+
11.166391
17141714
</td>
17151715
</tr>
17161716
<tr>
17171717
<td style="text-align:left;">
17181718
Gene_g
17191719
</td>
17201720
<td style="text-align:right;">
1721-
9.564607
1721+
8.889014
17221722
</td>
17231723
<td style="text-align:right;">
1724-
10.943613
1724+
9.860780
17251725
</td>
17261726
<td style="text-align:right;">
1727-
8.815916
1727+
9.617840
17281728
</td>
17291729
</tr>
17301730
<tr>
17311731
<td style="text-align:left;">
17321732
Gene_h
17331733
</td>
17341734
<td style="text-align:right;">
1735-
9.633494
1735+
9.838351
17361736
</td>
17371737
<td style="text-align:right;">
1738-
9.724424
1738+
8.941217
17391739
</td>
17401740
<td style="text-align:right;">
1741-
11.069627
1741+
9.474184
17421742
</td>
17431743
</tr>
17441744
</tbody>

docs/presentations/singlepage/Session3.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/presentations/slides/Session1.html

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -841,33 +841,33 @@
841841

842842

843843
``` python
844-
biglist = my_strs + my_ints
844+
biglist = my_ints + my_strs
845845
biglist
846846
```
847847

848848
```
849-
## ['a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5]
849+
## [1, 2, 3, 4, 5, 'a', 'b', 'c', 'd', 'e']
850850
```
851851

852852

853853
``` python
854-
biglist = my_strs
855-
biglist += my_ints
856-
biglist
854+
biglist2 = [1,2,3,4,5]
855+
biglist2 += my_strs
856+
biglist2
857857
```
858858

859859
```
860-
## ['a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5]
860+
## [1, 2, 3, 4, 5, 'a', 'b', 'c', 'd', 'e']
861861
```
862862

863863

864864
``` python
865-
biglist = my_strs * 5
866-
biglist
865+
biglist3 = my_strs * 5
866+
biglist3
867867
```
868868

869869
```
870-
## ['a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5, 'a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5, 'a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5, 'a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5, 'a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5]
870+
## ['a', 'b', 'c', 'd', 'e', 'a', 'b', 'c', 'd', 'e', 'a', 'b', 'c', 'd', 'e', 'a', 'b', 'c', 'd', 'e', 'a', 'b', 'c', 'd', 'e']
871871
```
872872

873873
---
@@ -882,7 +882,7 @@
882882
```
883883

884884
```
885-
## ['a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5, 'f']
885+
## ['a', 'b', 'c', 'd', 'e', 'f']
886886
```
887887

888888

@@ -892,7 +892,7 @@
892892
```
893893

894894
```
895-
## ['a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5, 'f', 1]
895+
## ['a', 'b', 'c', 'd', 'e', 'f', 1]
896896
```
897897

898898
---
@@ -909,7 +909,7 @@
909909
```
910910

911911
```
912-
## ['a', 'b', 'c', 'c', 'd', 'e', 1, 2, 3, 4, 5, 'f', 1]
912+
## ['a', 'b', 'c', 'c', 'd', 'e', 'f', 1]
913913
```
914914

915915
* `.remove()` removes something from the list, but will only remove the first instance
@@ -921,20 +921,10 @@
921921
```
922922

923923
```
924-
## ['a', 'b', 'c', 'd', 'e', 1, 2, 3, 4, 5, 'f', 1]
924+
## ['a', 'b', 'c', 'd', 'e', 'f', 1]
925925
```
926926

927-
* the generic `del` statement removes an argument from a specific position in the list
928-
929-
930-
``` python
931-
del my_strs[3]
932-
my_strs
933-
```
934927

935-
```
936-
## ['a', 'b', 'c', 'e', 1, 2, 3, 4, 5, 'f', 1]
937-
```
938928

939929
---
940930
## Functions and lists
@@ -952,11 +942,27 @@
952942
## 2
953943
```
954944

955-
* `.append()` will append the supplied argument to the list
945+
* the generic `del` statement removes an argument from a specific position in the list
946+
947+
948+
``` python
949+
del my_strs[3]
950+
my_strs
951+
```
952+
953+
```
954+
## ['a', 'b', 'c', 'e', 'f', 1]
955+
```
956+
957+
* we can also test membership of an element with the `in` operator
956958

957959

958960
``` python
959-
my_strs.append("f")
961+
"a" in my_strs
962+
```
963+
964+
```
965+
## True
960966
```
961967

962968
---
@@ -1360,7 +1366,7 @@
13601366
```
13611367

13621368
```
1363-
## {'a', 'd', 'c', 'b'}
1369+
## {'d', 'a', 'c', 'b'}
13641370
```
13651371

13661372

@@ -1393,7 +1399,7 @@
13931399
---
13941400
## Sets are unique
13951401

1396-
Even if you provide duplicate entries to a set, the set wil only contain unique values.
1402+
Even if you provide duplicate entries to a set, the set will only contain unique values.
13971403

13981404

13991405
``` python
@@ -1570,6 +1576,10 @@
15701576
arr
15711577
```
15721578

1579+
```
1580+
## array(['a', '2', '3'], dtype='&lt;U21')
1581+
```
1582+
15731583
---
15741584
## Adding Dimensions
15751585

@@ -1614,7 +1624,7 @@
16141624
## (3, 3)
16151625
```
16161626

1617-
The shape of an array can easily be changed with the `reshape` method. Note that you will get an error if the number of values in the array doesn't fit int othe dimensions specified.
1627+
The shape of an array can easily be changed with the `reshape` method. Note that you will get an error if the number of values in the array doesn't fit into the dimensions specified.
16181628

16191629

16201630
``` python
@@ -1837,7 +1847,7 @@
18371847
* Tuples - If you want to create an immutable version of a list as some kind of reference.
18381848
* Sets - Similar to Tuples, but if you do not want any repeating values.
18391849
* Dictionaries - If you have complex data i.e. different shape and size, and you will have some kind of key/lookup values.
1840-
* Arrays - When you have rectangular data i.e. a table.
1850+
* Arrays - When you have rectangular data i.e. a table, need to perform math on elements or interface with more advanced computational libraries (stats, ML, etc)
18411851

18421852
---
18431853
class: inverse, center, middle
@@ -1867,6 +1877,8 @@
18671877
* `code` - the start of the code is indicated by a colon, new line and indentation.
18681878
* `return` - this is the result that you wish to be delivered from the function.
18691879

1880+
NOTE: In python functions, indentation after defining the function is required. Otherwise you will get an error.
1881+
18701882

18711883
``` python
18721884
def myFirstFunction(num1, num2):
@@ -2058,7 +2070,8 @@
20582070

20592071
Once I have made a function and I want to keep reusing it I can easily save it i.e. I have a function that I want to use regularly to process some data in the same way. To do this you save it as a script.
20602072

2061-
First open a new script: File &gt; New File &gt; Python Script. We can then add our orginal function and save the python script as *myFirstFunction.py*.
2073+
First open a new script: File &gt; New File &gt; Python Script. We can then add our original function and save the python script as *myFirstFunction.py*.
2074+
20622075

20632076

20642077
``` python
@@ -2075,6 +2088,7 @@
20752088
First open a new script: File &gt; New File &gt; Python Script. We can then add our orginal function and save the python script as *myFirstFunction_script.py*.
20762089

20772090

2091+
20782092
``` python
20792093
import myFirstFunction_script
20802094

0 commit comments

Comments
 (0)