четверг, 3 августа 2017 г.

First 100 pages of "The Black Swan" by N. Taleb

So it is interesting book, really. Just trying not to fall asleep reading it.

Interesting fact #1 - Lebanon is not part of the Near East, Lebanon is The Mediterranean’s

Interesting fact #2 - people likely tend to be more stressed loosing money (87'' black monday as an example). And even war is something less stressing.

Interesting fact #3 - Black Swan (capitalized) not a bird. It's unpredictable event with big influence, positive or negative. Financial, technical, cultural, social, no matter.

пятница, 28 июля 2017 г.

Internet of Things - Amazon tools and Python

Recording of my lightning talk on Pacemaker conference.

Covered high level of Python SDK for IoT services. To start it is no need for actual device even. Amazon gives an option to use grammatically emulated IoT device. This may be your python script, Flask application and so on.


пятница, 21 апреля 2017 г.

Ubuntu 6.10 under VMware Fusion

Occasionally found old Ubuntu 6.10 CD disk in my desk. These was sent for free some years ago by Canonical. I have used it as a tea cup holder for some time :)
And now just wonder does it still works and how this Ubuntu 6 used to look like.
Running it under VMware Fusion 7 results in freeze. One option helped me - in Compatibility I set hardware version to 7 (and removed camera and SATA cd from VM).

пятница, 17 марта 2017 г.

Async Python: real men, threads and twisted

Here is recording of my presentation on Pacemaker conference about asynchronous Python stuff: jobs, workers, twisted, threads and subprocesses. It is in Ukrainian language, and presentation itself is in English. Enjoy :)


среда, 8 марта 2017 г.

NDB admin panel for Google App Engine

Used github to find rain repo to answer someone's question. And noted NDB Admin repo (https://github.com/vsergeyev/ndbadmin). If you use Google App Engine with Python, it may be worth to look. It build with Django/Flask in mind.
One picture is better than page of words:

Or live Demo: http://ndbadmin-live.appspot.com/

Usage is straightforward, add Meta subclass into your Model definition.
Something like this:
class Item(ndb.Model):
    name = ndb.StringProperty()

    class Meta():
        def __init__(self):
            self.order_by = Item.name

Rain effect in Lua/Corona

Just noted comment on my old YouTube tutorial with sample of rain effect.
Code and original post was on my old blog, so. Thats cool it is a copy on github:
https://github.com/vsergeyev/Rain

So enjoy.


It is quite simple to use rain in your Corona SDK game:

local rain = require("rain")

rain.new(group, {})


Pause rain
----------

rain.pause()


Resume rain
-----------

rain.resume()

среда, 18 января 2017 г.

Wiki templates for HTML/JavaScript web app

This may be useful when one have legacy Wiki-formatted content and want to put it on new HTML layout/application.

As a starting point used wiki2html parser from Remy Sharp.

Here is quick working example on JSFiddle https://jsfiddle.net/v77s1d2x/


So to make this works, structure your HTML page for Wiki template in some kind of:

<div id="content">
    ... media wiki content ...
</div>

<script type="text/javascript">
    var content = document.getElementById("content");
    content.innerHTML = tohtml(content.innerHTML);
</script>

This may save a tons of time and be used to embed media Wiki blocks wherever you need in your web application.