все бюджетные (и не очень) организации перейдут на отечественный линукс с 2020 года
В связи с этим вопрос, что лучше для разработки использовать?
больше нравится (изучаю самостоятельно) JAVA
для работы с бд в Java gui интерфейс можно нарисовать?
как узнать сколько раз процесс мигрировал с одного процессорного ядра на другое?
perf stat
:$ perf stat true
Performance counter stats for 'true':
0.801845 task-clock (msec) # 0.445 CPUs utilized
0 context-switches # 0.000 K/sec
------> 0 cpu-migrations # 0.000 K/sec
42 page-faults # 0.052 M/sec
634,587 cycles # 0.791 GHz
459,763 instructions # 0.72 insn per cycle
89,841 branches # 112.043 M/sec
3,812 branch-misses # 4.24% of all branches
0.001801905 seconds time elapsed
gdb выдает следующее
char* command; while(strcmp(command, "exit") == 1);
fig, (ax1, ax2) = plt.subplots(2, 1, sharex='all', figsize=(640/my_dpi, 2*480/my_dpi), dpi=my_dpi)
два объекта с непересекающимся временем жизни могут иметь одинаковый id
agluhov@forge:~$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> s = 'test_string'
>>> id(s[1:5]) == id(s[2:6])
True
>>> id(s[1:5])
139620785926528
>>> id(s[2:6])
139620785926528
>>> print(id(s[1:5]))
139620785926384
>>> print(id(s[2:6]))
139620785926576
>>> print(id(s[1:5]), id(s[2:6]))
(139620785926528, 139620785926528)
print(["Bad","Good"][int(input() == "CC{Maybe_long_but_not_so_wise_snek}")])
>>> s = """))'''ALkFbIzIDWE}vJ=`}vJ?ehgP>fRpMXe4yS(`@HO|F;5SGcG)GsLhMM;cf-OzbU4S<EwNMdXzMMTSMgG<ev4SKoG)G)KN-O|ukDG@nm4SH(^nMkEE-OO#kDG1uv4SfPM*GdFYMMgEE-O+MU4S@=J;OZ}zfGSvD-Ouc@ePWS`fGVQW-O%8E-Oyl1fPpA`fGtWj^M1*kDGwoAfPpT0pMjLhMMMr=eGqs3NMqJM*GrKR^MO7`EGfVm4SXbM*Gp2{+Oz{D-OsoAfPbg_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WMTP6WBZMMT63YVZI4PDWMJTL3GRAGTTMFQRZOJTV3QPAMGTL2GTAEGTDMQNAEMTMFQBZOJZL3GRAMHTVLQZZEGTLMGVAEHTL2GZZMJZL3QVAEITVLQZZWKTZMQNAEIT43QZZWGTRMJRAEIT43QZZWJZZMQDAEIT43QZZWGTRMQDZEFTLMGVBOHZR3GNAEFTMFGXZWJZL2GBAMMTEDGVZMIUR2GBAWETL4GVLMHTZ2TPAOLTLMQTZEGUR3TRAOMTMEGTZWJTV3QPAWKTZ2GTZOHZV2QBAGQT42GZZMHUN2GZZMDTEEQVZMJZV3QBAWDTH2QTZOJT42QFAGPTEFGVAOJTHMGNZMETL4QZAWIT42TPAGQTH4QTZEKUN3GZAEFTMFQZAOJTL2GFAGSTH3QTZOIUNMGRZMIT43QZAOHTLMGFA3OTLMQTZWGURMGTAEETH4QVMWJZZ2GDZMGTEFGBAWIZR2GBAMHTZ4GVBWJUR3TTAEHTEEQXZWGZDMJVZEFTV4GRBWUSRKTVMYQA5FTXXOWSR======\'))")
...
...
sudo touch /etc/systemd/system/bot.service
[Unit]
Description=My bot
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python /путь/до/скрипта/bot.py
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable bot.service
sudo systemctl start bot.service
sudo systemctl stop bot.service
sudo systemctl disable bot.service
sudo systemctl status bot.service