Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Programování 1 pro matematiky
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Programování 1 pro matematiky
Commits
20474c90
Commit
20474c90
authored
5 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Knihovna: Slidy hotovy
parent
1ab11651
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
12-knihovna/12-knihovna.tex
+50
-2
50 additions, 2 deletions
12-knihovna/12-knihovna.tex
with
50 additions
and
2 deletions
12-knihovna/12-knihovna.tex
+
50
−
2
View file @
20474c90
...
...
@@ -87,7 +87,7 @@ Typ {\bf bytes} obsahuje neměnnou posloupnost bajtů (8-bitových hodnot).
~
Literály:
{
\tt
b'Brum'
}
,
{
\tt
b'
\bs
{}
x62
\bs
{}
x72
\bs
{}
x75
\bs
{}
x6d'
}
Literály:
~~
{
\tt
b'Brum'
}
~~
{
\tt
b'
\bs
{}
x62
\bs
{}
x72
\bs
{}
x75
\bs
{}
x6d'
}
~
...
...
@@ -153,7 +153,7 @@ a.itemsize
\item
{
\bf
i
}
-- integer: aspoň 32-bitové číslo se znaménkem
\item
{
\bf
I
}
-- totéž bez znaménka
\item
{
\bf
b
}
-- bajt se znaménkem
\item
{
\bf
q
}
-- a
le
spoň 64-bitové číslo se znaménkem
\item
{
\bf
q
}
-- aspoň 64-bitové číslo se znaménkem
\item
{
\bf
f
}
-- float: aspoň 32-bitové desetinné číslo
\item
{
\bf
d
}
-- double: aspoň 64-bitové desetinné číslo
\end{itemize}
...
...
@@ -237,4 +237,52 @@ random.random()
% ----------------------------------------------------------------------
\begin{frame}
{
Pseudonáhodný výběr
}
\py
{
%
random.choice(['pátek','sobota','neděle'])
}{
%
'neděle'
\cmt
{
(náhodný prvek seznamu)
}
}
\py
{
%
random.choices("0123456789", k=10)
}{
%
['3','4','9','8','1','3','2','1','8','6']
\\\cmt
{
(výběr s~vracením zpět)
}
}
\py
{
%
random.sample("0123456789", k=10)
}{
%
['3','0','6','1','2','7','4','9','5','8']
\\\cmt
{
(výběr bez vracení)
}
}
\py
{
%
random.sample(range(1000000), k=5)
}{
%
[301599, 128323, 695182, 627325, 967424]
\\\cmt
{
(vzorkuje přímo rozsah, nepřevádí na seznam)
}
}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}
{
Další zajímavé moduly
}
\begin{itemize}
\item
{
\bf
datetime
}
,
{
\bf
calendar
}
-- práce s~datem a časem
\item
{
\bf
copy
}
-- rekurzivní kopírování
\item
{
\bf
cmath
}
-- počítání s~komplexními čísly
\item
{
\bf
statistics
}
-- základní statistické funkce
\item
{
\bf
pickle
}
-- (de)serializace datových struktur
\item
{
\bf
re
}
-- analýza textu pomocí regulárních výrazů
\end{itemize}
\end{frame}
% ----------------------------------------------------------------------
\end{document}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment