Posts

Math tales: a short story about everything

At the edge of the Universe, located in its center, there is an amazing Machine: with an unimaginable speed it repeats again and again some very simple operations. At     first it extracts Something from All Things That Already Exist, then from the same source — from the All Things That Already Exist — it takes Some Set. Having these two, it proceeds to the third operation — the Union — and gets as a result a New Set. The fourth operation is combining items of the New Set in all possible ways. It worth to mention here that the Machine is able to extract items without corruption of their source. So, after the fourth step the Machine has a Set Of Subsets of the New Set. At the fifth operation it creates One More Set, but… its content is undefined. Yes, it is undefined because at this stage the Machine doesn’t know it. At the sixth step it resorts to the Union again — now it applies it to the One More Set and the New Set mentioned above. On the seventh step our mechanism behaves quite tri

Ο• Preliminary considerations on theory of meaning

 In short: (just as a hypothesis) • meaning of message (word/sentence/text) for human = sustainable/reproducible and predictable mental representations caused by the message in the brain of message receiver •  mental representations  consist of some very basic perceptions intrinsic for human individuals • being able to enumerate that  basic perceptions  we can “encode” any complex representation — that is it is like a machine code of brain-computer • and as well it makes possible to specify semantics of natural language formally Details I’m not an expert in the theory of meaning, just curious about it so I don’t pretend that the statements above are true and bring any new knowledge to the field. But when you are going to study something it is normal to have in mind some preliminary picture consisting of what there can be and expectations about the results of study. So my expectation here is to confirm or refute the “hypothesis” by finding more adequate discoveries. Anyway this is a

πŸ˜„ Anti-COVID-Vaccinated Bell Pepper Autopsy

Image
Of course it has nothing to do with all that COVID history — just to be in trend πŸ˜„ Curious how would it happen:

πŸ’» Programming: recipe: response validation against OpenAPI schema in Python

Image
Summary: code snippets and explanation of how to validate HTTP-response using  openapi-core package If you deal with some service based on OpenAPI Specification you might want to perform validation of HTTP responses returned by it. One of the ways to do this an internet search provides for Python is to use openapi-core package. If you look at their documentation ( here or here ) you will find it very stingy: couple of short code snippets and couple of sentences just stating what is done. In particular for response validation we have exactly the following:   You can also validate against responses   from openapi_core . validation . response . validators import ResponseValidator   validator = ResponseValidator (spec) result = validator . validate (request, response)   # raise errors if response invalid result .raise_for_errors()   # get list of errors errors = result .errors ...   Here we see some confusing things: why do we need a request object to be able to validate the respo

πŸ’» Programming: recipe: pytest: assertion after all tests run

Example of how to check some conditions when ALL test suites finished (or enforce some test running at the end of session). This may be useful to ensure that you have tested all functions of some module whose interface can change in future. The code: from   pytest   import   fixture     Data  =  dict ( cnt  =  0 )   @fixture ( scope = 'session' ) def   data_0 ():        yield   Data        # (this will be done AFTER all tests below)      assert   Data [ 'cnt' ] ==  3 ,  f 'data-cnt:  { Data [ "cnt" ] } '   @fixture def   data ( data_0 ):        Data [ 'cnt' ] +=  1        return   Data [ 'cnt' ]   def   test_11 ( data ):        print ()      print ( 'test-11:' ,  data )   def   test_12 ( data ):        print ()      print ( 'test-12:' ,  data ) Output: ERROR test_1.py::test_12 - AssertionError: data-cnt: 2 _________ Other articles ~ programming

⚙️ TRIZ notes: the law of regression

Image
 Working  on his theory of inventions  Genrich Altshuller  invented/discovered so called  Laws of technical systems evolution  which further were developed by other contributors. Looking at those laws we can see that all of them are in some sense “positive” — i.e. implicitly assume that technical systems always develop from “worse” to “better” only. BUT from my experience I can conclude that the things are not so simple. For example: in 2000ths I used several button-based “stupidphones”. They could do almost nothing except the very basic functions a phone in general is necessary for. And of course it was very unsatisfactory. But when I changed to use “smartphones” I soon was faced with very disappointing obstacle: when I set an alarm on a “stupidphone” and it happens that the device is low on power it still is able to awake next day to activate the alarm and perform ringing even if it turned off due to a complete discharge of the battery before. Very helpful feature. And no modern devi