Skip to content

Instantly share code, notes, and snippets.

View TyVik's full-sized avatar

Viktor Tyshchenko TyVik

View GitHub Profile
@TyVik
TyVik / nasa.py
Created June 27, 2017 18:36
Example of aiohttp
#!/usr/bin/env python3
import io
import random
from aiohttp import web, ClientSession
from aiohttp.web import HTTPFound
from PIL import Image
NASA_API_KEY = 'DEMO_KEY'
ROVER_URL = 'https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos'
@TyVik
TyVik / redis_dump.py
Created June 27, 2017 09:51
Export and import to redis from text file with list of jsons.
#!/usr/bin/env python3
import argparse
import redis as server
import json
import pickle
import lzma
PORT = 6379
DB = 0
@TyVik
TyVik / MainActivity.java
Created July 5, 2012 09:10 — forked from romannurik/SwipeDismissListViewTouchListener.java
**BETA** Android 4.0-style "Swipe to Dismiss" sample code
// THIS IS A BETA! I DON'T RECOMMEND USING IT IN PRODUCTION CODE JUST YET
/*
* Copyright 2012 Roman Nurik
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0