Self contained Django, or Django like Flask

Posted on czw 14 maja 2020 in misc • Tagged with tipsNtricks, django, flask, pytest

Have you thought about spawning Django as easy as Flask?

Imagine that you have a library, which may have a feature that is usable in Django. How to test it?

99% of you would say - make a Django project, put test inside the project, and run django test.

I thought …


Continue reading

Corona-bike

Posted on śro 01 kwietnia 2020 in improvements • Tagged with coronavirus, funny

Coronavirus or not - I need to do some sports.
bike


Continue reading

ESP32 for Pycopy (Pfalcon's Micropython)

Posted on sob 29 czerwca 2019 in micropython • Tagged with IoT, micropython, python

ESP32 for Pycopy (Pfalcon's Micropython) can be downloaded here.

More details


why I dropped pipenv in favor of homemade bash script?

Posted on sob 18 maja 2019 in misc

Long time ago ...

... i suffered from fact, that I'm not able to track my pip dependencies. pip freeze was not solution, because it attached lot of dependencies, which was broken in few months.

I dreamed about software, which will track my pip install commands, and will store key dependencies in …


Continue reading

My new ESP32 is bricked?

Posted on śro 17 kwietnia 2019 in micropython • Tagged with IoT, micropython, python, tipsNtricks

TL;DR: press 'boot' button when flashing ESP32. At least some of them.

I have connected newly bought ESP32 to usb cable and try to flash it with micropython image.

(micro) maho@dlaptop:~$ esptool.py --port=/dev/ttyUSB0 erase_flash
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting........_____....._____ …

Continue reading

Micropython fork wars

Posted on pią 05 kwietnia 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 śro 20 lutego 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 pon 20 sierpnia 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 nie 15 lipca 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 pon 28 maja 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