Skip to content

Commit f4d27ab

Browse files
committed
[Update] : Initial Setup
1 parent d843ca3 commit f4d27ab

31 files changed

+16820
-0
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/intro.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
sidebar_position: 1
3+
keywords: [python, tutorial, introduction, introduction to python]
4+
---
5+
6+
# Introduction
7+
8+
Let's uncover **The Mystery behind Python**.
9+
10+
## History of Python
11+
12+
Python was created by Guido van Rossum and first released in 1991. Van Rossum began developing Python in the late 1980s as a successor to the ABC programming language, aiming to address its limitations while maintaining ease of use. The name "Python" was inspired by the British comedy group Monty Python, reflecting Van Rossum's desire to make programming more enjoyable. Python 2.0 was released in 2000, introducing new features like list comprehensions and garbage collection. In 2008, Python 3.0, a major revision, was launched to fix inconsistencies and improve language design, although it was not fully backward compatible with Python 2. Python 2 reached its end of life in 2020, and Python 3 has since become the standard. Over the years, Python's simplicity, versatility, and community-driven development have contributed to its widespread adoption across industries, making it one of the most popular programming languages in the world today.
13+
14+
### Why learn Python?
15+
16+
- **Easy to Learn and Use**: Python has a simple syntax that is easy to read and write, making it an excellent choice for beginners and experienced programmers alike.
17+
- **Versatile Applications**: Python can be used in web development, data science, machine learning, automation, and more, providing diverse career opportunities.
18+
- **Extensive Libraries and Frameworks**: Python offers a rich set of libraries and frameworks (e.g., Pandas, Django, TensorFlow) that simplify and speed up the development process.
19+
- **Strong Community Support**: Python has a large and active community, which means you can easily find help, tutorials, and resources when learning or solving problems.
20+
- **High Demand in the Job Market**: Python is widely used in many industries, and its popularity continues to grow, leading to a high demand for Python developers and related roles.
21+
22+
## Getting Started
23+
24+
This course is designed in such a way that you will learn the basics of Python and then move towards more advanced topics of Python. To ensure full utilization of this course we encourage you to follow along with the course. We recommend to write the code along with us to ensure complete understanding.
25+
26+
Now lets start this **_exciting journey of Python_**.
27+
28+
## Development Environment
29+
30+
Development is fun when you use the correct set of tools to help you assist along the way. Let's setup the **Development Environment** for Python.
31+
32+
### Python Compiler/ Interpreter
33+
34+
Python is a High Level Language, and it needs a tool that can convert the high level code to machine readable code. For that, we will need a compiler/ interpreter. In order to install the python compiler, [click here](https://www.python.org/).
35+
36+
### Code Editor
37+
38+
Code Editor is program where you will be writing your program. It is one of the most important part of development, and also it determines developer experience.
39+
40+
We recommend **Visual Studio Code ([VS Code](https://code.visualstudio.com/Download/))** for code editor as it is one of the best and feature rich code editor that is used in industry.
41+
42+
### Extensions
43+
44+
**VS Code** provides you with a lot of extensions that you can install to improve developer experience and also to increase the features. The follow are the extensions that we recommend you to install.
45+
46+
- **Prettier** : As a developer you not only have to write functional code but also the code that is easy to understand and easy to understand for other developers. Prettier is a extension that helps to prettify/ format your code so that it is easy on eyes and understandable.
47+
48+
- **Python**: A Visual Studio Code extension with rich support for the Python language (for all actively supported Python versions), providing access points for extensions to seamlessly integrate and offer support for IntelliSense (Pylance), debugging (Python Debugger), formatting, linting, code navigation, refactoring, variable explorer, test explorer, and more!
49+
50+
This is it for the development environment. You can explore more to enhance your code editor and personalize it to be yours.

docs/python-basics/_category_.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Python - Basics",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Learn about some basic concepts of Python."
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Sample Program
6+
7+
Before learning about python program, let's see a sample python program to be familiar with how the code looks.
8+
9+
## Code
10+
11+
```python title="sample.py"
12+
# This is a simple program that asks for your name and says hello!
13+
14+
# Ask the user for their name
15+
name = input("What is your name? ")
16+
17+
# Greet the user
18+
print("Hello, " + name + "! Welcome to the world of Python programming.")
19+
```
20+
21+
### Explanation:
22+
23+
- **`#`**: Anything after `#` is a comment, which explains the code. It doesn't affect how the program runs.
24+
- **`input()`**: This function asks the user to type something. In this case, it asks for their name.
25+
- **`print()`**: This function displays information on the screen. Here, it greets the user using the name they entered.
26+
27+
This small program gives an idea of how we interact with users and use simple functions to make the program more engaging.

docusaurus.config.ts

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
import {themes as prismThemes} from 'prism-react-renderer';
2+
import type {Config} from '@docusaurus/types';
3+
import type * as Preset from '@docusaurus/preset-classic';
4+
5+
const config: Config = {
6+
title: "Learn Python",
7+
tagline: "Python Made Easy By ComputeNepal",
8+
favicon: "img/ComputeNepal-logo.jpg",
9+
10+
// Set the production url of your site here
11+
url: "https://computenepal.com/",
12+
// Set the /<baseUrl>/ pathname under which your site is served
13+
// For GitHub pages deployment, it is often '/<projectName>/'
14+
baseUrl: "/",
15+
16+
// GitHub pages deployment config.
17+
// If you aren't using GitHub pages, you don't need these.
18+
organizationName: "computenepal", // Usually your GitHub org/user name.
19+
projectName: "learn-python", // Usually your repo name.
20+
21+
onBrokenLinks: "throw",
22+
onBrokenMarkdownLinks: "warn",
23+
24+
// Even if you don't use internalization, you can use this field to set useful
25+
// metadata like html lang. For example, if your site is Chinese, you may want
26+
// to replace "en" with "zh-Hans".
27+
i18n: {
28+
defaultLocale: "en",
29+
locales: ["en"],
30+
},
31+
32+
presets: [
33+
[
34+
'classic',
35+
{
36+
docs: {
37+
sidebarPath: './sidebars.ts',
38+
// Please change this to your repo.
39+
// Remove this to remove the "edit this page" links.
40+
editUrl: "https://github.com/computenepal/learn-html/tree/master",
41+
},
42+
theme: {
43+
customCss: './src/css/custom.css',
44+
},
45+
} satisfies Preset.Options,
46+
],
47+
],
48+
49+
themeConfig: {
50+
// Replace with your project's social card
51+
metadata: [{
52+
name: 'keywords', content: 'python, learn python, tutorial, python tutorial, learn to code'
53+
}],
54+
navbar: {
55+
title: "Learn Python",
56+
logo: {
57+
alt: "ComputeNepal Logo",
58+
src: "img/ComputeNepal-logo.jpg",
59+
},
60+
items: [
61+
{
62+
type: "docSidebar",
63+
sidebarId: "tutorialSidebar",
64+
position: "left",
65+
label: "Learn",
66+
},
67+
{ href: "https://computenepal.com", label: "Blog", position: "left" },
68+
{
69+
href: "https://github.com/computenepal/learn-html",
70+
label: "GitHub",
71+
position: "right",
72+
},
73+
],
74+
},
75+
footer: {
76+
style: 'dark',
77+
links: [
78+
{
79+
title: "Docs",
80+
items: [
81+
{
82+
label: "Tutorial",
83+
to: "/docs/intro",
84+
},
85+
],
86+
},
87+
{
88+
title: "Community",
89+
items: [
90+
{
91+
label: "Facebook Group",
92+
href: "https://www.facebook.com/groups/computenepal",
93+
},
94+
{
95+
label: "Youtube@ComputeNepal",
96+
href: "https://youtube.com/@computenepal",
97+
},
98+
{
99+
label: "Youtube@ramCoder",
100+
href: "https://youtube.com/@ramcoder",
101+
},
102+
{
103+
label: "Twitter",
104+
href: "https://twitter.com/computenepal",
105+
},
106+
],
107+
},
108+
{
109+
title: "More",
110+
items: [
111+
{
112+
label: "ComputeNepal",
113+
href: "https://www.computenepal",
114+
},
115+
{
116+
label: "GitHub",
117+
href: "https://github.com/computenepal/learn-html",
118+
},
119+
],
120+
},
121+
],
122+
copyright: `Copyright © ${new Date().getFullYear()} ComputeNepal. Built with Docusaurus.`,
123+
},
124+
prism: {
125+
theme: prismThemes.github,
126+
darkTheme: prismThemes.dracula,
127+
},
128+
} satisfies Preset.ThemeConfig,
129+
};
130+
131+
export default config;

0 commit comments

Comments
 (0)