This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ano_nebo_ne(otazka): | |
"Vrátí True nebo False, podle odpovědi uživatele" | |
while True: | |
odpoved = input(otazka) | |
if odpoved == 'ano': | |
return True | |
elif odpoved == 'ne': | |
return False | |
else: | |
print('Nerozumím! Odpověz "ano" nebo "ne".') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import asyncio | |
import multiprocessing | |
import os | |
import ssl | |
from time import sleep | |
port = 9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ ca ] | |
default_ca = CA_default | |
[ CA_default ] | |
dir = /XXX/root-ca | |
certs = $dir/certs | |
crl_dir = $dir/crl | |
new_certs_dir = $dir/newcerts | |
database = $dir/index.txt | |
serial = $dir/serial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fib(n): | |
# just an example function | |
if n == 0: | |
return 0 | |
if n == 1: | |
return 1 | |
return fib(n-1) + fib(n-2) | |

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
# PuLP is an LP modeler written in Python. | |
# PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, | |
# and GUROBI to solve linear problems. | |
import pulp | |
from pulp import ( | |
LpMaximize, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is_even = lambda n: n % 2 == 0 | |
even_numbers = filter(is_even, range(10**100)) | |
with open('even_numbers.txt', 'w') as f: | |
for number in even_numbers: | |
f.write('{}\n'.format(number)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
from optparse import OptionParser | |
import os | |
from select import select | |
import socket | |
def main(): | |
op = OptionParser() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph cv5 { | |
// public int fnc() { | |
node [fontname="menlo-regular"]; | |
edge [fontname="arial"]; | |
// B999(); | |
// int d999 = 808; |