"Каждый день мы используем числа, чтобы прогнозировать погоду, определять время, считать деньги… С помощью математики мы можем анализировать преступления, выявлять закономерности, предсказывать поведение… Используя числа, мы можем решить величайшие загадки".
Кто знает из какого сериала это цитата?
P.S. в далеком 2007 это был мой любимый сериал, кстати на сайте wolfram.com есть целый раздел в котором рассказывают, какие разделы математики изспользовались в каждой серии :)
Как часто вы используете математику в работе и/или имеет ли смысл ей заниматься?
Кто знает из какого сериала это цитата?
P.S. в далеком 2007 это был мой любимый сериал, кстати на сайте wolfram.com есть целый раздел в котором рассказывают, какие разделы математики изспользовались в каждой серии :)
Как часто вы используете математику в работе и/или имеет ли смысл ей заниматься?
Как быстро читать входные данные на Python и конвертировать в int()
Недавно я решал задачу (UVa 10013 - Super long sums), и там я наткнулся на ситуацию, где нужно было максимально быстро читать входные данные.
Т.е о чем речь? Необходимо читать данные из стандартного потока ввода stdin и конвертировать в int/float или что-то еще.
https://asoldatenko.com/fast-way-to-get-input-python.html
Недавно я решал задачу (UVa 10013 - Super long sums), и там я наткнулся на ситуацию, где нужно было максимально быстро читать входные данные.
Т.е о чем речь? Необходимо читать данные из стандартного потока ввода stdin и конвертировать в int/float или что-то еще.
https://asoldatenko.com/fast-way-to-get-input-python.html
Code Jam 2018 Finals Livestream
https://www.youtube.com/watch?v=urT6rDu60h4&feature=share
https://www.youtube.com/watch?v=urT6rDu60h4&feature=share
YouTube
Code Jam 2018 Finals Livestream
Ready, set, code! The #CodeJamFinals were streamed live from the Google Toronto office on August 10 at 12:30 PM EST. The top 25 Code Jammers put their skills to the test against challenging algorithmic problems designed by Google engineers for a chance to…
Слайды моего доклада на OdessaPY'18 - https://goo.gl/ZjY8JP
Там можно найти несколько полезных ссылок и книг)
Там можно найти несколько полезных ссылок и книг)
Dropbox
sport_programming.pdf
Shared with Dropbox
This function helps you do not see errors during upload solutions, because you forget to switch back to sys.stdin and also you can easily debug your code with ipdb or another python debuggers
https://gist.github.com/andriisoldatenko/cd6d10e2d9ff147a612838e8afa34e3d
https://gist.github.com/andriisoldatenko/cd6d10e2d9ff147a612838e8afa34e3d
Gist
This function helps you do not see errors during upload solutions, because you forget to switch back to sys.stdin and also you…
This function helps you do not see errors during upload solutions, because you forget to switch back to sys.stdin and also you can easily debug your code with ipdb or another python debuggers - fop...
Всем привет!
15-16 февраля 2019 года пройдет PyConBelarus, мы уже начали принимать заявки на доклады и активно ищем новых спикеров :)
Если вы думаете подать доклад или это ваша первая заявка можно написать мне, я подскажу как это сделать более эффективно (telegram/twitter @a_soldatenko)
https://www.papercall.io/pyconby
https://by.pycon.org/
15-16 февраля 2019 года пройдет PyConBelarus, мы уже начали принимать заявки на доклады и активно ищем новых спикеров :)
Если вы думаете подать доклад или это ваша первая заявка можно написать мне, я подскажу как это сделать более эффективно (telegram/twitter @a_soldatenko)
https://www.papercall.io/pyconby
https://by.pycon.org/
Guido van Rossum is the creator of Python, one of the most popular and impactful programming languages in the world. This conversation is part of the Artificial Intelligence podcast and the MIT course 6.S099: Artificial General Intelligence.
https://www.youtube.com/watch?time_continue=1&v=ghwaIiE3Nd8
https://www.youtube.com/watch?time_continue=1&v=ghwaIiE3Nd8
YouTube
Guido van Rossum: Python | Lex Fridman Podcast #6
Нашел старый, но актуальный доклад от Автора книги "Effective Python" на PyConUS 2016 :)
Очень крутые Jupyter notebooks -> https://github.com/bslatkin/pycon2016
https://www.youtube.com/watch?v=D_6ybDcU5gc
Очень крутые Jupyter notebooks -> https://github.com/bslatkin/pycon2016
https://www.youtube.com/watch?v=D_6ybDcU5gc
GitHub
GitHub - bslatkin/pycon2016: Example code from the talk "Refactoring Python: Why and how to restructure your code" at PyCon 2016
Example code from the talk "Refactoring Python: Why and how to restructure your code" at PyCon 2016 - bslatkin/pycon2016
Результаты голосования Python Core Devs касательно модели без BDFL ->
https://discuss.python.org/t/python-governance-vote-december-2018-results/546
https://discuss.python.org/t/python-governance-vote-december-2018-results/546
Discussions on Python.org
Python governance vote (December 2018): Results
Python governance vote (December 2018) As described in PEP 8001, the governance election has been completed. The result is that PEP 8016: The Steering Council Model (Smith, Stufft) has been selected as the winner. Supervisor: Ernest W. Durbin III [email protected]…
Если вы еще не в курсе то уже есть видео с FOSDEM
https://video.fosdem.org/2019/UD2.120/
https://video.fosdem.org/2019/UD2.120/
Forwarded from 🇺🇦 Go for two :)
COME ON SHOW US THE REGULAR EXPRESSION
или как Cloudflare обещает показать регулярное выражение ...
https://blog.cloudflare.com/cloudflare-outage/
или как Cloudflare обещает показать регулярное выражение ...
https://blog.cloudflare.com/cloudflare-outage/
Forwarded from Sysadmin Tools 🇺🇦
Автор python requests ищет новых владельцев для своих репозиториев, и предлагает передать их во владение в этой теме
Если вы умеете в python и вам близка тема open source - wellcome!
Если вы умеете в python и вам близка тема open source - wellcome!
GitHub
find a new home for all repos · Issue #21 · not-kennethreitz/team
In the spirit of transparency, I'd like to (publicly) find a new home for my repositories. I want to be able to still make contributions to them, but no longer be considered the "owner&quo...
Сегодня буду выступать на бесплатной онлайн конференции Python fwdays’19 с темой: "The art of data engineering".
-> https://fwdays.com/event/python-fwdays-online-conference
-> https://fwdays.com/event/python-fwdays-online-conference
Fwdays
Python fwdays'19 онлайн-конференція
Найбільші IT конференції в Україні: Software Architecture, Highload, DevOps, Management (leads, C-level), JavaScript, Frontend, React, Data Science та AI, PHP, Python та ін.
Дэвид Бизли выложил курс, на который потратил около 13 лет:
https://dabeaz-course.github.io/practical-python
https://dabeaz-course.github.io/practical-python
practical-python
Welcome!
Practical Python Programming (course by @dabeaz)
Forwarded from oleg_log (Oleg Kovalov)
"filter(P, S) is almost always written clearer as [x for x in S if P(x)]"
(с) Guido van Rossum on Python
(с) Guido van Rossum on Python
A tool (and pre-commit hook) to automatically add trailing commas to calls and literals.
tl;dr:
https://github.com/asottile/add-trailing-comma
tl;dr:
# with no trailing commas
x(
- arg
+ arg,
+ arg2
)
# with trailing commas
x(
arg,
+ arg2,
)
https://github.com/asottile/add-trailing-comma
GitHub
GitHub - asottile/add-trailing-comma: A tool (and pre-commit hook) to automatically add trailing commas to calls and literals.
A tool (and pre-commit hook) to automatically add trailing commas to calls and literals. - asottile/add-trailing-comma
После моего доклада на python fwdays обещал рассказать как пользоваться tcpdump:
Andrii Soldatenko, [18.05.20 13:15]
tcpdump example:
1. Я запустил postgresql в докере и пробросли порт в систему (5432)
f9284723a810 postgres "docker-entrypoint.s…" 2 days ago Up 2 days 0.0.0.0:5432->5432
2. запускаем tcpdump:
-X print data of each packet in hex and ascii
3. Логинимся
у меня это md5 - Require the client to supply an MD5-encrypted password for authentication. See Section 19.3.2 for details.
Andrii Soldatenko, [18.05.20 13:15]
tcpdump example:
1. Я запустил postgresql в докере и пробросли порт в систему (5432)
f9284723a810 postgres "docker-entrypoint.s…" 2 days ago Up 2 days 0.0.0.0:5432->5432
2. запускаем tcpdump:
sudo tcpdump -i lo0 -nX dst port 5432важный параметр:
-X print data of each packet in hex and ascii
3. Логинимся
PGPASSWORD=postgres psql -U postgres -h localhost4. То что видим в tcpdump output (некоторые пакеты я пропустил):
13:09:25.020387 IP6 ::1.62337 > ::1.5432: Flags [P.], seq 8:92, ack 2, win 6371, options [nop,nop,TS val 962074756 ecr 962074756], length 84Далее все завист от того как настроен ваш сервер БД (https://www.postgresql.org/docs/9.1/auth-pg-hba-conf.html)
0x0000: 6004 334d 0074 0640 0000 0000 0000 0000 `.3M.t.@........
0x0010: 0000 0000 0000 0001 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0001 f381 1538 3b74 c631 ...........8;t.1
0x0030: b72a e9e7 8018 18e3 007c 0000 0101 080a .*.......|......
0x0040: 3958 1884 3958 1884 0000 0054 0003 0000 9X..9X.....T....
0x0050: 7573 6572 0070 6f73 7467 7265 7300 6461 user.postgres.da
0x0060: 7461 6261 7365 0070 6f73 7467 7265 7300 tabase.postgres.
0x0070: 6170 706c 6963 6174 696f 6e5f 6e61 6d65 application_name
0x0080: 0070 7371 6c00 636c 6965 6e74 5f65 6e63 .psql.client_enc
0x0090: 6f64 696e 6700 5554 4638 0000 oding.UTF8..
1
13:09:25.022436 IP6 ::1.62337 > ::1.5432: Flags [P.], seq 92:133, ack 15, win 6371, options [nop,nop,TS val 962074758 ecr 962074758], length 41
0x0000: 6004 334d 0049 0640 0000 0000 0000 0000 `.3M.I.@........
0x0010: 0000 0000 0000 0001 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0001 f381 1538 3b74 c685 ...........8;t..
0x0030: b72a e9f4 8018 18e3 0051 0000 0101 080a .*.......Q......
0x0040: 3958 1886 3958 1886 7000 0000 286d 6435 9X..9X..p...(md5
0x0050: 6234 3339 6532 3464 3065 6231 3861 3635 b439e24d0eb18a65
0x0060: 6431 6563 3039 6438 3231 3333 3665 6565 d1ec09d821336eee
0x0070: 00 .
1
у меня это md5 - Require the client to supply an MD5-encrypted password for authentication. See Section 19.3.2 for details.
13:09:25.022436 IP6 ::1.62337 > ::1.5432: Flags [P.], seq 92:133, ack 15, win 6371, options [nop,nop,TS val 962074758 ecr 962074758], length 41но бывает там стоит
0x0000: 6004 334d 0049 0640 0000 0000 0000 0000 `.3M.I.@........
0x0010: 0000 0000 0000 0001 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0001 f381 1538 3b74 c685 ...........8;t..
0x0030: b72a e9f4 8018 18e3 0051 0000 0101 080a .*.......Q......
0x0040: 3958 1886 3958 1886 7000 0000 286d 6435 9X..9X..p...(md5
0x0050: 6234 3339 6532 3464 3065 6231 3861 3635 b439e24d0eb18a65
0x0060: 6431 6563 3039 6438 3231 3333 3665 6565 d1ec09d821336eee
0x0070: 00 .
1
password - Require the client to supply an unencrypted password for authentication
=)