| Command | Description |
|---|---|
h |
Left |
j |
Down |
k |
Up |
l |
Right |
| Command | Description |
| class SparseVector: | |
| def __init__(self, values, indexes, length): | |
| self.values = values | |
| self.indexes = indexes | |
| self.length = length | |
| def items(self): | |
| indexes = enumerate(self.indexes) | |
| i, index = next(indexes, (-1, -1)) | |
| for j in range(self.length): |
| { | |
| "basics": { | |
| "name": "Jakub Tesárek", | |
| "label": "Software Engineer", | |
| "picture": "https://tesarek.me/media/profile.png", | |
| "email": "[email protected]", | |
| "phone": "+420 721812945", | |
| "website": "https://tesarek.me", | |
| "summary": "I am software engineer with more than 9 years of experience. I learn fast and in my career I adopted many different technologies a programming languages - I started as a PHP web developer. Currently I'm designing and programming cloud applications in Python using AWS.", | |
| "location": { |
| import aiohttp | |
| import asyncio | |
| url = 'https://httpbin.org/get' | |
| class HttpClient: | |
| def __init__(self): | |
| self.session = aiohttp.ClientSession() |
| import random | |
| def roll2d6(): | |
| res = random.randint(1, 6) + random.randint(1, 6) | |
| while res <= 2 and random.randint(1, 6) <= 3: | |
| res -= 1 | |
| while res >= 12 and random.randint(1, 6) >= 4: | |
| res += 1 | |
| return res |
| import re | |
| summary = '[application-package-1.234] bug fixed' | |
| res = re.match('\[(?P<pkg>(?P<pkg_name>[a-zA-Z\-]+)-(?P<pkg_ver>[0-9](\.[\.0-9]+)?))\] ?(?P<desc>.+)', summary) | |
| print res.groupdict() |
| <style type="text/css"> | |
| #canvas { | |
| /*background-color: red;*/ | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| cursor: pointer; | |
| /*pointer-events: none;*/ | |
| } | |
| </style> |
| <?php | |
| /* | |
| Objectives: | |
| - Create PHP script that will translate input data to expected output from example below. | |
| - Calculate time complexity of your script | |
| bonus: Implement solution that will not use pass-by-reference and will not use objects | |
| */ | |
| $input = [ | |
| 'A' => 1, |
| # if not running interactively, don't do anything | |
| [ -z "$PS1" ] && return | |
| # Detect platform | |
| platform='unknown' | |
| unamestr=`uname` | |
| if [[ "$unamestr" == 'Linux' ]]; then | |
| platform='linux' | |
| elif [[ "$unamestr" == 'FreeBSD' ]]; then | |
| platform='freebsd' |