Skip to content

Commit 2629cf7

Browse files
updated
1 parent c360500 commit 2629cf7

Some content is hidden

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

53 files changed

+13814
-2
lines changed

.nojekyll

Lines changed: 0 additions & 1 deletion
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
FROM python:latest
2+
3+
# Create user with a home directory.
4+
ARG NB_USER=pythonist
5+
ARG NB_UID=1000
6+
ENV USER ${NB_USER}
7+
ENV HOME /home/${NB_USER}
8+
9+
RUN adduser --disabled-password \
10+
--gecos "Default user" \
11+
--uid ${NB_UID} \
12+
${NB_USER}
13+
14+
# Switching to workdirectory.
15+
WORKDIR ${HOME}
16+
17+
COPY pyproject.toml poetry.lock ${HOME}/
18+
19+
# Upgrading PIP.
20+
RUN python -m pip install -U pip
21+
22+
# Installing Poetry.
23+
RUN curl -sSL https://install.python-poetry.org | python3 -
24+
25+
# Force poetry addition of path.
26+
ENV PATH = "${PATH}:/home/${NB_USER}/.local/bin"
27+
28+
# Configuring poetry to not create a virtualenv as Docker itself meant for Isolation.
29+
RUN poetry config virtualenvs.create false
30+
31+
# Installing packages using Poetry.
32+
RUN poetry install
33+
34+
# Copy the repo to the workdir.
35+
COPY . ${HOME}/
36+
37+
# Change owner of all the files present in the working directory to NB_USER
38+
RUN chown -R ${NB_USER} ${HOME}/
39+
40+
# Switch user from root to NB_USER.
41+
USER ${USER}
42+
43+
# Exposing port 8888.
44+
EXPOSE 8888
45+
46+
# Configuring entrypoint for the docker container.
47+
ENTRYPOINT [ "poetry", "run" ]
48+
49+
CMD [ "jupyter-lab", "--ip", "0.0.0.0", "--port", "8888", "--no-browser" ]

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Prodigious Python
2+
3+
![Prodigious Python cover](https://github.com/ProdigiousPython/AssetStore/blob/main/Prodigious%20Python%20Cover.png?raw=true)
4+
5+
🚀 [Homepage](https://prodigiouspython.github.io/ProdigiousPython)
6+
7+
📖 [PDF](https://drive.google.com/file/d/1DF1IhLzjnLSzSlNO3PE1hcuv_Cgx6bAS/view?usp=sharing)
8+
9+
Welcome to Prodigious Python 🐍
10+
11+
Idea of Prodigious Python is to be different from the traditional books.
12+
13+
We wanted Prodigious Python to be:
14+
15+
* Fun 🎉
16+
* Executable 🤖
17+
* Publishable via static web pages and PDF ⚙️
18+
19+
# Development setup
20+
21+
First things first, We need to clone our repo
22+
23+
```shell
24+
git clone https://github.com/ProdigiousPython/ProdigiousPython.git
25+
```
26+
27+
We use [Poetry](https://python-poetry.org/) for the dependency mangement.
28+
29+
Let's install the packages required using the below command:
30+
31+
```shell
32+
poetry install
33+
```
34+
35+
To run the jupyter-lab:
36+
37+
```shell
38+
poetry run jupyter-lab
39+
```
40+
41+
To convert the notebooks to html
42+
43+
```shell
44+
poetry run jb build .
45+
```
46+
47+
To convert the notebooks to pdf
48+
49+
```shell
50+
poetry run jb build --builder=pdfhtml .
51+
```
52+
The generated files would be present in `_build` folder.
53+
54+
55+
**Made with ❤️**

_config.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Book settings
2+
# Learn more at https://jupyterbook.org/customize/config.html
3+
4+
title: Prodigious Python 🐍
5+
author: Prodigious Python
6+
logo: logo.png
7+
email: "mr.naveen8@gmail.com"
8+
9+
# Force re-execution of notebooks on each build.
10+
# See https://jupyterbook.org/content/execute.html
11+
execute:
12+
execute_notebooks: force
13+
allow_errors: true
14+
only_build_toc_files: true
15+
16+
# Define the name of the latex output file for PDF builds
17+
latex:
18+
latex_documents:
19+
targetname: book.tex
20+
21+
# Add a bibtex file so that we can create citations
22+
bibtex_bibfiles:
23+
- references.bib
24+
25+
# Information about where the book exists on the web
26+
repository:
27+
url: https://github.com/ProdigiousPython/ProdigiousPython # Online location of your book
28+
branch: main # Which branch of the repository should be used when creating links (optional)
29+
30+
launch_buttons:
31+
notebook_interface: "jupyterlab"
32+
33+
# Add GitHub buttons to your book
34+
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
35+
html:
36+
use_issues_button: true
37+
use_repository_button: true
38+
google_analytics_id: G-1KZH2STPPK
39+
extra_footer: |
40+
<p>
41+
<a href="https://www.buymeacoffee.com/Naveen8" target="_blank"><img src="https://img.shields.io/badge/Support-Buy%20me%20a%20%E2%98%95-orange?style=flat-square&logo=appveyor.svg" alt="Buy Me A Coffee"></a>
42+
<a href="https://www.linkedin.com/in/naveenkumarreddy8/" target="_blank"><img src="https://img.shields.io/badge/Follow-LinkedIn-0077B5?style=flat-square&logo=appveyor.svg" alt="Follow LinkedIn"></a>
43+
</p>
44+
45+
sphinx:
46+
config:
47+
html_baseurl: 'https://prodigiouspython.github.io/ProdigiousPython/'
48+
extra_extensions:
49+
- sphinx_sitemap

_toc.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Table of contents
2+
# Learn more at https://jupyterbook.org/customize/toc.html
3+
4+
format: jb-book
5+
root: intro
6+
parts:
7+
- caption: 1. Introduction to Python 🐍
8+
numbered: True
9+
chapters:
10+
- file: prodigiouspython/Chapter_1/1_Getting_Started_With_Python_Language
11+
- file: prodigiouspython/Chapter_1/2_Creating_Variables_and_Assigning_Values
12+
- file: prodigiouspython/Chapter_1/3_Keywords_and_Variable_naming
13+
- file: prodigiouspython/Chapter_1/4_Datatypes
14+
- file: prodigiouspython/Chapter_1/5_Collection_Types
15+
- file: prodigiouspython/Chapter_1/6_IDEs_for_Python
16+
- file: prodigiouspython/Chapter_1/7_User_Input
17+
- file: prodigiouspython/Chapter_1/8_Builtins
18+
- file: prodigiouspython/Chapter_1/9_Modules
19+
- file: prodigiouspython/Chapter_1/10_String_representations_of_objects
20+
- file: prodigiouspython/Chapter_1/11_Installing_Packages
21+
- file: prodigiouspython/Chapter_1/12_Help_Utility
22+
- caption: 2. Indendation
23+
numbered: True
24+
chapters:
25+
- file: prodigiouspython/Chapter_2/1_Indentation
26+
- caption: 3. Comments and Docstrings
27+
numbered: True
28+
chapters:
29+
- file: prodigiouspython/Chapter_3/1_Comments_and_docstrings
30+
- caption: 4. Functions
31+
numbered: True
32+
chapters:
33+
- file: prodigiouspython/Chapter_4/1_Functions
34+
- file: prodigiouspython/Chapter_4/2_Positional_Arguments
35+
- file: prodigiouspython/Chapter_4/3_Unnamed_Positional_Arguments
36+
- file: prodigiouspython/Chapter_4/4_Keyword_only_arguments
37+
- file: prodigiouspython/Chapter_4/5_Keyword_arguments
38+
- file: prodigiouspython/Chapter_4/6_Default_Arguments
39+
- file: prodigiouspython/Chapter_4/7_TLDR_about_Functions_arguments
40+
- file: prodigiouspython/Chapter_4/8_Lambda_functions
41+
- caption: 5. Operators
42+
numbered: True
43+
chapters:
44+
- file: prodigiouspython/Chapter_5/1_Mathematical_Operators
45+
- file: prodigiouspython/Chapter_5/2_Boolean_Operators
46+
- file: prodigiouspython/Chapter_5/3_Comparison_Operators
47+
- caption: 6. Conditionals
48+
numbered: True
49+
chapters:
50+
- file: prodigiouspython/Chapter_6/1_Conditionals
51+
- caption: 7. Loops
52+
numbered: True
53+
chapters:
54+
- file: prodigiouspython/Chapter_7/1_Loops
55+
- caption: 8. Classes
56+
numbered: True
57+
chapters:
58+
- file: prodigiouspython/Chapter_8/1_Classes
59+
- file: prodigiouspython/Chapter_8/2_Class_Attributes
60+
- file: prodigiouspython/Chapter_8/3_Class_Static_Methods
61+

compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
prodigiouspython:
3+
ports:
4+
- 8888:8888
5+
volumes:
6+
- ./:/home/pythonist/prodigiouspython
7+
image: "naveen8/prodigiouspython:latest"

index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)