Исправлены главы
This commit is contained in:
6
src-intro/.ipynb_checkpoints/Untitled-checkpoint.ipynb
Normal file
6
src-intro/.ipynb_checkpoints/Untitled-checkpoint.ipynb
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"cells": [],
|
||||
"metadata": {},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
49
src-intro/Untitled.ipynb
Normal file
49
src-intro/Untitled.ipynb
Normal 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
46
src-intro/Untitled.ipynb~
Normal 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
14
src-intro/fib.py
Normal 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
1
src-intro/hello.py
Normal file
@@ -0,0 +1 @@
|
||||
print("Hello from Python!")
|
||||
6
src-intro/walkers.py
Normal file
6
src-intro/walkers.py
Normal 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))
|
||||
Reference in New Issue
Block a user