Python is one of the tools in my toolbox, so I never used it exclusively. This means i need to get an update, occasionally.
Rant mode on
They want to have an expressive language, so they keep adding features upon features to it, instead of caring too much about performance (which means that no JIT - just-in-time compiler - has been added to cpython).
I would have thought that typescript is gaining over python on github, because node.js is JIT based, unlike cpython, but that guess was wrong: github article. The github article suggests a different reason:
/More Eitzes from me, 'Eitzes is billik' - advice comes cheap.../
This gist is my experience. In general: do not trust such advice. Somehow the market tends to change every few years, always be aware of that possibility and be on the look-out.
You can work for a big established company or for a startup. With more advanced companies you have a less stressed environment / and a more steady job, kind of.
Hello software developers,
Please check your code to ensure you're not making one of the following mistakes related to cryptography.
- Writing your own home-grown cryptography primitives (For example: Mifare Classic)
- Exception: For the sake of learning, but don't deploy it in production.
- Using a fast hash function (e.g. MD5, SHA256) for storing passwords. Use bcrypt instead.
- Not using a cryptographically secure random number generator
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| from alembic import config | |
| from alembic import script | |
| from alembic.runtime import migration | |
| import sqlalchemy | |
| import exceptions | |
| engine = sqlalchemy.create_engine(DATABASE_URL) | |
| alembic_cfg = config.Config('alembic.ini') |
This document is a reference for common testing patterns in a Django/Python project using Pytest.
Contents:
Pytest is a powerful Python testing framework that is widely used for unit testing, integration testing, and functional testing. This guide will take you step by step from basic to advanced features of Pytest, providing a comprehensive understanding of its capabilities.
Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".
Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: https://talks.golang.org/2012/waza.slide#1 which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).
Let's dig in: