BufWriter<Master<'_>> – Telegram
BufWriter<Master<'_>>
105 subscribers
451 photos
28 videos
34 files
1.7K links
https://www.patreon.com/alxe_master

Видео/статьи. Конспект и мои вольные комментарии по инженерии. тут только то, что считаю полезным для себя или других =)

#os, #cloud, #rust, #golang, #python, #javaScript, #cpp, etc
Download Telegram
== 5 Pytest Best Practices for Writing Great Python Tests
https://www.nerdwallet.com/blog/engineering/5-pytest-best-practices/

- USE FIXTURES !!!
- USE PARAMETRIZATION !!!

1) Prefer mocker over mock
2) Parametrize the same behavior, have different tests for different behaviors
3) Don’t modify fixture values in other fixtures
4) Prefer responses over mocking outbound HTTP requests
5) Prefer tmpdir over global test artifacts

== Some pytest best practices
https://www.back2code.me/2020/05/some-pytest-best-practices/
1) Put inputs and output in the function parameters
2) Log a message instead of commenting the function
3) Write always assertion in the same way
4) Write assertion human readable error message

== Plugin List
https://docs.pytest.org/en/latest/reference/plugin_list.html
open tracing

== https://opentracing.io/
крайне простая шляпа., по факту бенчи каждого чиха

== Take OpenTracing for a HotROD ride
https://medium.com/opentracing/take-opentracing-for-a-hotrod-ride-f6e3141f7941

== Demo of Opentracing and Jaeger
https://www.youtube.com/watch?v=EdFYvUBaKbY

== Tutorial
https://github.com/yurishkuro/opentracing-tutorial/tree/master/python
1) Lesson 01 - Hello World
Instantiate a Tracer
Create a simple trace
Annotate the trace
2) Lesson 02 - Context and Tracing Functions
Trace individual functions
Combine multiple spans into a single trace
Propagate the in-process context
3) Lesson 03 - Tracing RPC Requests
Trace a transaction across more than one microservice
Pass the context between processes using Inject and Extract
Apply OpenTracing-recommended tags
4) Lesson 04 - Baggage
Understand distributed context propagation
Use baggage to pass data through the call graph
5) Extra Credit
Use existing open source instrumentation
== Deploy MkDocs via Github actions
https://bluegenes.github.io/
mkdocs-github-actions/
просто как залить на гитхабпэйджи свой сайт сгенеренный при помощи mkdocs
== connection name

https://andygrunwald.com/blog/your-database-connection-deserves-a-name/

postgres:
dsn := "postgres://user:pass@127.0.0.1/database?application_name=currency-conversion-app"
client, err := sql.Open("postgres", dsn)

redis:
CLIENT SETNAME currency-conversion-app

rabbitmq:
config := amqp.Config{
Properties: amqp.Table{
"connection_name": "currency-conversion-app",
},
}
client, err := amqp.DialConfig("amqp://guest:guest@127.0.0.1:5672/", config)
== Tesla AI Day
https://youtu.be/j0z4FweCy4M
ну что... скоро экзофлопы не за горами...
супер мать его компьютер в одном корпусе блин)

9 петафлопс = один модуль, мать