Исправлены главы

This commit is contained in:
Sergey Lemeshevsky
2020-02-24 11:32:37 +03:00
parent 55d41eebee
commit af27efd7f6
23 changed files with 3016 additions and 219 deletions

View File

@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}

49
src-intro/Untitled.ipynb Normal file
View File

@@ -0,0 +1,49 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Заголовок 1 уровня\n",
"## Заголовок 2 уровня\n",
"### Заголовок 3 уровня"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> Этот текст печатается со сдвигом\n",
"> по отношению к основному тексту."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

46
src-intro/Untitled.ipynb~ Normal file
View File

@@ -0,0 +1,46 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Заголовок 1 уровня\n",
"## Заголовок 2 уровня\n",
"### Заголовок 3 уровня"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

14
src-intro/fib.py Normal file
View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
def fib(n):
"""
Возвращает список первых n чисел Фибоначи
"""
f0, f1 = 0, 1
f = [1]*n
for i in range(1, n):
f[i] = f0 + f1
f0, f1 = f1, f[i]
return f
print(fib(10))

1
src-intro/hello.py Normal file
View File

@@ -0,0 +1 @@
print("Hello from Python!")

6
src-intro/walkers.py Normal file
View File

@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
import numpy as np
def random_walker_max_distance(M, N):
trajectories = [np.random.randn(M).cumsum() for _ in range(N)]
return np.max(np.abs(trajectories))