Skip to content

Instantly share code, notes, and snippets.

View martin-kokos's full-sized avatar

martin-kokos martin-kokos

View GitHub Profile
@martin-kokos
martin-kokos / aiohttp_auto_decompress.md
Last active January 11, 2018 09:42
aiohttp decompress automatically based on Content-Encoding

Server

from aiohttp import web
import zlib

async def index(request):
    return web.Response(text=await request.text())

app = web.Application()
@martin-kokos
martin-kokos / pv_booking_task.md
Last active January 15, 2018 09:41
Kiwi.com _Python víkend_ task

Kiwi.com Python víkend task

If you have applied for our Python vikend course this task serves to asess if you have sufficient knowledge to enjoy and learn something on our course.

Task

Your task is to use our flights API to find a flight and book the flight on the booking API. If it sounds too complicated. Don't worry, it's not.

APIs

Flights

We at Kiwi.com use simple APIs based on HTTP, usually with payload in JSON format. If you've never used an API click here:

@martin-kokos
martin-kokos / install_pip_grab.sh
Last active December 3, 2016 14:05
Install python vikend prerequisites on clean Ubuntu
#!/usr/bin/bash
apt-get install python-setuptools python-dev build-essential libcurl4-openssl-dev libssl-dev
easy_install pip
pip install grab cssselect
python -c 'import grab; print(grab.Grab().go("kiwi.com").code)'
@martin-kokos
martin-kokos / pv_vikend.md
Last active June 11, 2017 13:44
Python víkend: Zadání úkolu

Python víkend v Kiwi.com - vstupní úkol

Pomocí této úlohy nám prokážete, že jste s Pythonem již přišli do styku a znáte jeho základy. Tím pádem by nemělo nic bránit tomu, abyste si workshop užili a nebyl pro vás příliš složitý.

##Limitace

Žádné limitace.

  • Python2.7 nebo 3
  • všechny moduly jsou povoleny