View Makefile
importy.png: importy.dot
dot -Tpng importy.dot > importy.png
View aws_logger_demo.py
#!/usr/bin/env python3
import boto3
from datetime import datetime
import logging
import socket
from time import time, sleep
logger = logging.getLogger(__name__)
View dependency_container.py
#!/usr/bin/env python3
'''
Inspired by pytest fixtures :)
'''
import argparse
from inspect import signature
import logging
from reprlib import repr as smart_repr
View gist:371afb36fb2527353c398649911c989b
export default class PageLayout extends React.Component {
render() {
const {
children, siteTitleH1, mobileView, userAgent,
currentLanguage, enVersionUrl, csVersionUrl,
} = this.props;
let appBar = null;
View flask_matplotlib_demo.py
import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
return 'ahoj <img src="/graf">'
@app.route('/graf')
def graf():
View fizzbuzz.py
either = lambda a, b: lambda i: a(i) or b(i)
plus = lambda a, b: lambda i: a(i) + b(i)
div = lambda n: lambda i: i % n == 0
iff = lambda c, a, b: lambda i: a(i) if c(i) else b(i)
nothing = lambda x: ''
itself = lambda x: x
const = lambda x: lambda i: x
# some hints how it works :)
View bst_check.py
# from HackerRank.com
""" Node is defined as
class node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
"""
def check_binary_search_tree_(root, lower_bound=None, upper_bound=None):
if not root:
View PyWorking_SQL_demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View caesar.py
#!/usr/bin/env python3
ciphertext = '''
ymjwj fwj ybt ydujx tk jshwduynts: tsj ymfy bnqq
uwjajsy dtzw xnxyjw kwtr wjfinsl dtzw infwd fsi tsj ymfy bnqq
uwjajsy dtzw ltajwsrjsy. ymnx nx f ajwd nrutwyfsy qjxxts yt
wjrjgjwjxujhnfqqd ktw fyyfhpx zxnsl kwjvzjshd fsfqdxnx bmnhm
wjvznwj qtsljw ufxxflj tk yjcy ns twijw yt fhmnjaj gjyyjw wjxzqyx.
'''
View Dockerfile
FROM debian:stretch
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils wget bzip2
WORKDIR /src