Micropython fork wars

Posted on Fri 05 April 2019 in micropython • Tagged with IoT, micropython, python

UPDATE

Pycopy's ESP32 image can be downloaded here

If you ecounter following problem:

    TypeError: function takes 2 positional arguments but 3 were given

while trying to use uasyncio and micropython - then to save your time, learn a bit about current situation in project:

There is fork war between Micropython and …


Continue reading

Opowieść o Księciuniu

Posted on Wed 20 February 2019 in misc

Przed Księciuniem

Pracując w pewniej firmie telekomunikacyjnej, natknąłem się na typa, o którym chciałem napisać. Dla potomnych, ale też i dla siebie. Żeby wspominając po latach, mieć dowód na to, że pamięć mnie nie zawodzi i to wszystko naprawdę miało miejsce.

Firma, o której mowa, popadła w lekki kryzys i …


Continue reading

Tworzenie Gier w Kivy i Kivent (jak zacząć)

Posted on Mon 20 August 2018 in python • Tagged with kivy, kivent

Skąd toto?

To jest artykuł napisany na potrzeby konferencji PyconPL 2018 i jest też do ściągnięcia z PyconPLowego githuba

Wstęp

Zarówno Kivy jak i Kivent mogą służyć do pisania prostych gier w Pythonie. W tym artykule, na przykładzie bardzo prostej aplikacji gropodobnej, porównam podstawowe aspekty tworzenia gier w jednym i …


Continue reading

Effective hg blame in VIM

Posted on Sun 15 July 2018 in misc • Tagged with tipsNtricks, hg, vim

If you want to open tab in vim, which shows you file history, file blame (who changed what) and patch history, here is easy command:

    :let fname=expand("%") | tabnew | execute 'read!hg blame '.fname | vnew | execute 'read!hg glog '.fname | new | execute 'read!hg glog -p '.fname

(Non) humming servo

Posted on Mon 28 May 2018 in micropython

While I'm IoT, my servo is humming in almost every position. I hear annoying noise every time it's not moving.

After asking Dr. Google, I know that: servo is bad and I need to use another one, or is set to position which it unable to achieve and need to …


Continue reading

pmount hangs on autocompletion

Posted on Wed 09 May 2018 in misc • Tagged with tips&tricks

Problem

Bash autocompletion is very good thing if works. If doesn't, becames pain in the ass. Like in Debian's pmount - when you type '/dev/sdc' hit tab and wait forever.

Problem is described in many places (eg here and here), so why shouldn't I describe it once more?

Reason

Script …


Continue reading

PG dump with update

Posted on Fri 09 March 2018 in postgres • Tagged with tips&tricks

Many times, I need to edit some value in particular row in table. The easiest way is to use pgAdminIII - however I don't use it, I'm addicted to psql.

Consider such table:

maho=# CREATE TABLE example(id SERIAL, vals VARCHAR);
CREATE TABLE
maho=# INSERT INTO example(vals) VALUES('some string …

Continue reading

Vuejs, Node i różne takie JSy

Posted on Fri 23 February 2018 in misc • Tagged with maruda

Fajne są te frameworki, React, Vuejs, Angular itd... Ale momentami mam wrażenie że ogon macha psem :).

Będąc zmęczony Angularem, postanowiłem następny prosty interfejsik wykonać w czymś innym. Padło na Vuejs, ponoć najprostsze.

Coś tam zrobiłem działającego, postanowiłem ubrać to w jakieś ikonki. W poprzednim bootstrapie były glyphicons - w najnowszym to …


Continue reading

Queryset repr trick

Posted on Thu 15 February 2018 in misc • Tagged with tipsNtricks, python

Sometimes, when I'm debugging something using pudb (probably it affects any interactive debugger), pudb is reflecting value of variables of QuerySet type, which makes unneccesary query to database. It makes debugging slow, and sometimes it breaks debugging context because of making changes in db.

To avoid that, add following code …


Continue reading

blog is live again

Posted on Sun 04 February 2018 in misc

And my blog is live again, this time using Pelican - static blog content generator.

UPDATE: I thougt about using Disqus for comments, but looks that they started adding ads. So, maybe static generated blog is NOT good idea?