Category Archives: Uncategorized

Covid-19 beyond borders

United States of America are leading other states in both Covid-19 cases and deaths. Let us have a look at Covid-19 pandemic reshuffling current states a bit. We combine existing countries data to create just 4 states:

  1. Union – USA
  2. Semi Union – European Union and UK
  3. Former Union – Russian Federation and former Soviet Union except Baltic
  4. Otherland – Remaining countries

Thus we have 3 unions with similar population size and rest of the world to compare with. Please not on picture below population is in US billions (10e9).

Otherland dwarfs unions in terms of population. Chart below shows just Unions. Variation in population size are due to the way ECDC data set is build – countries were added once they start to report Covid-19 case and deaths.

Absolute numbers – daily

On carts below we show absolute values for cases and deaths in each country. Both per day values and cumulative figures are presented. Country is marked once its cumulative cases figure tops 100. In absolute terms countries as we defined them are comparable in terms of detected cases, despite huge Otherland population.

  1. Looking at daily cases Otherland is on rise. Cases in Unions may have reached peak.
  2. Does grater territory size translate to a broader peak?
  3. Please note Covid-19 in Otherland started much earlier than in Unions.
  4. Initially testing capacity was low, it expanded rapidly often at expense of quality. Early cases may be under detected.
  5. Lack of single test standard adopted worldwide results in systematic errors.
  6. Otherland cases started earlier than Unions, yet daily cases surge happened later. This may result from decision (China) to stop cases reporting, after realizing the virus does less harm than hysteria around it. In modern information flow it is easier to make people forget by presenting fake victory, than convince them the virus is much less dangerous than initially afraid.
  1. Please note relatively low number of deaths in Former Union. This may be due to different criteria adopted to qualify deceased one as Covid-19 victim.
  2. Until now there is no singe Covid-19 death definition adopted worldwide. This is a serious failure of bodies like WHO. Some countries (Belgium, UK) report death even if no virus was detected. Patients with chronic lethal diseases are often declared Covid-19 victims, while the virus was not sole culprit.

Absolute numbers – cumulative

  1. Former union was in lock down, yet it experienced surge of cases after some delay. Quarantine measures may slow but not stop Covid-19 spread.
  1. Semi Union leads them all. Lead over Union can be attributed to broader definition of Covid-19 death.
  2. Former Union Covid-19 death definition is narrower, Covid-19 patient with cardiovascular disease history dying after hear attach is not counted as the virus victim. Cumulative deaths data confirm it.

Per million people data – daily

  1. Assuming virus is the same Union has the best testing capability.
  2. Peak infection already happened in all unions
  3. Otherland is either not testing or not reporting
  4. Test showing population share with antibodies (those who got the virus and recovered) would be really interesting. Union has plans to have one. Former Union will follow. Semi Union will have a long dispute about it. Otherland is excused since nobody can decide on it. I guess part of Otherland did the test and decided not to advertise it.
  1. Union and Semi Union have almost exactly the same – 8 – peak deaths per million people. Is it pure coincidence?
  2. Please note average death rate in developed countries is around 30 people per million per day.

Per million people data – cumulative

  1. Union leads. Best testing capability results in highest number of cases detected
  1. Semi Union and Union are comparable. Semi Union outbreak started earlier, so its figure is higher
  2. Former Union figure is much lower and it will stay like that due to narrower definition of Covid-19 death

Conclusions

  1. To understand situation use per million figures and compare with reference. Remember in average for each million 30 people die per day.
  2. Take some time to understand how numbers are produced. Former Union on deaths may be under reported, while Union and Semi Union ones are overstated. None is cheating, they just adopted different definition.
  3. Covid-19 seems to be developed countries problem. It is driven by media hype rather than actual virus impact. People like horror stories so they are fed with them.
  4. Lock down does not prevent virus spread, just buys 2-3 weeks delay.
  5. Maintaining hygiene standards helps to prevent any disease spread.
  6. Prolonged economy shutdown will do much hurt than the virus itself.
  7. In poor countries there are more prominent threats than Covid-19. Have a look at this clip from the move Lord of War, it explains situation well.

Multiple Python versions on Linux

Linux comes with Python bundled, but if it often lags recent developments. If you need a specific version of Python you can download it from python.org and install on your box. You can take .xz archive, it is slightly smaller and tar available on you linux box should handle it.

# change to a suitable directory and unpack python
tar xf ~/Downloads/Python-3.8.0.tar.xz 
./configure --prefix $HOME/.local    # any directory you can write to is fine
make
make test
make install
# make sure $HOME/.local/bin is on your $PATH
# python versions come with a nice naming convention
python3.8    # invokes python 3.8 interpreter you have installed
pip3.8       # installs packages for your version
# now you can create a virtual environment for your development
python3.8 -m venv project_directory

You don’t need to install python with sudo if you need it for private use. System rights are only needed if you want the software available for other users. If a software can run without system rights it should be run without them.

Are circular imports in python evil?

Circular imports can be confusing because import does two things:
1. executes imported module code
2. adds imported module to global symbol table of importing module
The former is done only once, while the latter at each import statement. Circular import creates situation when importing module uses imported one with partially executed code. In consequence it will not see objects created after import statement, below code sample demonstrates it.

main.py

print 'import b'
import b
print 'a in globals() {}'.format('a' in globals())
print 'import a'
import a
print 'a in globals() {}'.format('a' in globals())
if __name__ == '__main__':
print 'imports done'
print 'b has y {}, a is b.a {}'.format(hasattr(b, 'y'), a is b.a)

b.by

print "b in, __name__ = {}".format(__name__)
x = 3
print 'b imports a'
import a
y = 5
print "b out"

a.py

print 'a in, __name__ = {}'.format(__name__)
print 'a imports b'
import b
print 'b has x {}'.format(hasattr(b, 'x'))
print 'b has y {}'.format(hasattr(b, 'y'))
print "a out"

python main.py output with comments

import b
b in, __name__ = b # b code execution started
b imports a
a in, __name__ = a # a code execution started
a imports b # b code execution is already in progress
b has x True
b has y False # b defines y after a import,
a out # module a code executed
b out
a in globals() False # import only adds a to main global symbol table
import a
a in globals() True
imports done
b has y True, a is b.a True # all b objects are available

Circular imports are not the ultimate evil to be avoided at all cost. In some frameworks like Flask they are quite natural and tweaking your code to eliminate them does not make the code better.

Skok na bank centralny

Przestępczość oparta na wiedzy osiągnęła kolejny etap rozwoju, wyprowadzono pieniądze z banku centralnego. Bank centralny Bangladeszu nie jest pierwszym wśród podobnych sobie instytucji ale banki centralne maja kluczowe znacznie dla światowego systemu finansowego. Atak na jeden z nich jest atakiem na cały system. Continue reading

Migracja WordPress

Za sprawą polityki cenowej dostawcy usługi coroczna migracja ijbd.eu stała się tradycją. W home.pl, którego używam co łatwo sprawdzić za pomocą magicznych zaklęć nslookup i whois, jest duża różnica między regularną i promocyjną ceną usługi hostingowej. Ponieważ nie popieram dyskryminacji stałych klientów korzystam z promocyjnej oferty i co roku zmieniam serwer. Oczywiście trzeba przenieść usługę ze starego serwera na nowy i po to żeby operacja przebiegała sprawnie napisałem tę instrukcję. Mam nadzieję, że instrukcja będzie użyteczna także przy zmianie dostawcy usługi. Continue reading

Narzędzia w Agile w praktyce

Narzędzia w Agile były tematem #107 spotkania Agile Warsaw. Pierwszy punkt Agile Manifesto stawia ludzi i współpracę między nimi ponad narzędziami i procesami (Individuals and interactions over processes and tools) i dlatego dobór narzędzi jest ważny. Złe narzędzia zamiast pomagać będą szkodzić niepotrzebnie kierując uwagę zespołu na utrzymanie narzędzi. Continue reading

Poczta Polityka Prywatność

W ostatnich dniach wypłynęła informacja o ważnym urzędniku amerykańskim, który używał prywatnej poczty elektronicznej do celów służbowych. Tym urzędnikiem jest nie kto inny jak Hilary Clinton, była szefowa Departamentu Stanu ( U.S. State Department) i potencjalna kandydatka partii demokratycznej w wyborach roku 2016. Continue reading

Carbanak – Zorganizowana przestępczość oparta na wiedzy

Niedawno pojawiła się wiadomość o największym jak do tej pory przestępstwie komputerowym. Z kliku banków wykradziono duże sumy, mówi się o łącznej kwocie między 300 a 1000 milionów dolarów. Do ataku wykorzystano mechanizm, który można uznać za konia trojańskiego wspieranego przez zespół analityków. W ataku niezwykła jest skala prowadzonej operacji, która trwała wiele miesięcy a nawet lat i dotknęła kilkudziesięciu banków. Continue reading