Skip to content

Commit 2da78b7

Browse files
committed
source commit: 9510203
0 parents  commit 2da78b7

File tree

86 files changed

+16227
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+16227
-0
lines changed

CODE_OF_CONDUCT.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "Contributor Code of Conduct"
3+
---
4+
5+
As contributors and maintainers of this project,
6+
we pledge to follow the [Broad’s Standards of Conduct][soc].
7+
8+
Instances of abusive, harassing, or otherwise unacceptable behavior
9+
may be reported by following Broad [reporting guidelines][soc-reporting].
10+
11+
[soc-reporting]: https://intranet.broadinstitute.org/administration/reporting-ethics-compliance-or-policy-violation-including-harassment-and
12+
[soc]: https://intranet.broadinstitute.org/node/851

LICENSE.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: "Licenses"
3+
---
4+
5+
## Instructional Material
6+
7+
This lesson is derived from Carpentries (Software Carpentry, Data Carpentry,
8+
and Library Carpentry) instructional material which is made available under
9+
the [Creative Commons Attribution license][cc-by-human]. Any materials put forth
10+
for by the Computing Basics series is also provided under `CC BY 4.0` license. The following is a human-readable summary of (and not a substitute for) the [full legal text of the CC BY 4.0 license][cc-by-legal].
11+
12+
You are free:
13+
14+
- to **Share**---copy and redistribute the material in any medium or format
15+
- to **Adapt**---remix, transform, and build upon the material
16+
17+
for any purpose, even commercially.
18+
19+
The licensor cannot revoke these freedoms as long as you follow the license
20+
terms.
21+
22+
Under the following terms:
23+
24+
- **Attribution**---You must give appropriate credit (mentioning that your work
25+
is derived from work that is Copyright (c) The Carpentries and , where practical, linking to <https://carpentries.org/>), provide a [link to the
26+
license][cc-by-human], and indicate if changes were made. You may do so in
27+
any reasonable manner, but not in any way that suggests the licensor endorses
28+
you or your use.
29+
30+
- **No additional restrictions**---You may not apply legal terms or
31+
technological measures that legally restrict others from doing anything the
32+
license permits. With the understanding that:
33+
34+
Notices:
35+
36+
- You do not have to comply with the license for elements of the material in
37+
the public domain or where your use is permitted by an applicable exception
38+
or limitation.
39+
- No warranties are given. The license may not give you all of the permissions
40+
necessary for your intended use. For example, other rights such as publicity,
41+
privacy, or moral rights may limit how you use the material.
42+
43+
## Software
44+
45+
Except where otherwise noted, the example programs and other software provided
46+
by The Carpentries are made available under the [OSI][osi]-approved [MIT
47+
license][mit-license].
48+
49+
Permission is hereby granted, free of charge, to any person obtaining a copy of
50+
this software and associated documentation files (the "Software"), to deal in
51+
the Software without restriction, including without limitation the rights to
52+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
53+
of the Software, and to permit persons to whom the Software is furnished to do
54+
so, subject to the following conditions:
55+
56+
The above copyright notice and this permission notice shall be included in all
57+
copies or substantial portions of the Software.
58+
59+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
65+
SOFTWARE.
66+
67+
## Trademark
68+
69+
"The Carpentries", "Software Carpentry", "Data Carpentry", and "Library
70+
Carpentry" and their respective logos are registered trademarks of [Community
71+
Initiatives][ci].
72+
73+
[cc-by-human]: https://creativecommons.org/licenses/by/4.0/
74+
[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode
75+
[mit-license]: https://opensource.org/licenses/mit-license.html
76+
[ci]: https://communityin.org/
77+
[osi]: https://opensource.org

additional_material.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: Additional material
3+
---
4+
5+
A collection of facts about Python that do not fit into the main lesson
6+
either due to the scope or time constraints of the main lesson.
7+
8+
## Jupyter Notebook/IPython: Who's Who in Memory
9+
10+
You can use the `%whos` command at any time to see what
11+
variables you have created and what modules you have loaded into the computer's memory.
12+
As this is an IPython command, it will only work if you are in an IPython terminal or the
13+
Jupyter Notebook.
14+
15+
```python
16+
%whos
17+
```
18+
19+
```output
20+
Variable Type Data/Info
21+
--------------------------------
22+
weight_kg float 100.0
23+
weight_lb float 143.0
24+
```
25+
26+
<br />
27+
## Integer Division
28+
29+
We are using Python 3, where division always returns a floating point number:
30+
31+
```python
32+
5/9
33+
```
34+
35+
```output
36+
0.5555555555555556
37+
```
38+
39+
Unfortunately, this wasn't the case in Python 2:
40+
41+
```python
42+
5/9
43+
```
44+
45+
```output
46+
0
47+
```
48+
49+
If you are using Python 2 and want to keep the fractional part of division
50+
you need to convert one or the other number to floating point:
51+
52+
```python
53+
float(5)/9
54+
```
55+
56+
```output
57+
0.555555555556
58+
```
59+
60+
```python
61+
5/float(9)
62+
```
63+
64+
```output
65+
0.555555555556
66+
```
67+
68+
```python
69+
5.0/9
70+
```
71+
72+
```output
73+
0.555555555556
74+
```
75+
76+
```python
77+
5/9.0
78+
```
79+
80+
```output
81+
0.555555555556
82+
```
83+
84+
And if you want an integer result from division in Python 3,
85+
use a double-slash:
86+
87+
```python
88+
4//2
89+
```
90+
91+
```output
92+
2
93+
```
94+
95+
```python
96+
3//2
97+
```
98+
99+
```output
100+
1
101+
```
102+
103+

bar_plot_int.html

+14
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)