[00:05:53] VeeSot is now online
[00:10:03] ds.tihonov is now дома! :)
[00:11:34] singularity is now offline
[00:22:45] vaal is now away
[00:25:25] огыешсук is now away
[00:29:06] fuzzy is now online
[00:29:33] fuzzy is now online
[00:30:31] vaal is now online
[00:31:07] ambush is now offline
[00:33:47] ambush is now online
[00:37:05] VeeSot is now away
[00:37:19] VeeSot is now online
[00:41:33] singularity is now online
[00:53:06] fuzzy is now online
[00:54:17] fuzzy is now online
[00:57:04] VeeSot is now away
[00:57:20] VeeSot is now online
[01:03:40] singularity is now online
[01:03:56] fuzzy is now online
[01:04:01] fuzzy is now online
[01:06:13] vaal is now away
[01:06:13] vaal is now away
[01:07:32] fuzzy is now online
[01:08:38] vaal is now away
[01:08:38] vaal is now online
[01:08:42] vaal is now offline
[01:14:48] fuzzy is now online
[01:16:49] VeeSot is now offline
[01:18:49] огыешсук is now offline
[01:29:06] AlexZenon is now xa
[01:31:06] Tony is now online
[01:38:49] singularity is now offline
[01:41:05] Сволота is now away
[01:41:37] Сволота is now online
[01:58:26] fuzzy is now online
[01:58:39] Сволота is now away
[02:08:39] Сволота is now xa
[02:09:09] mrDoctorWho is now away
[02:16:51] Сволота is now online
[02:17:46] singularity is now online
[02:21:35] fuzzy is now online
[02:27:10] огыешсук is now online
[02:28:54] ambush is now offline
[02:29:09] mrDoctorWho is now xa
[02:42:01] огыешсук is now online
[02:46:22] огыешсук is now online
[02:56:15] огыешсук is now online
[02:57:41] огыешсук is now away
[03:01:47] огыешсук is now away
[03:05:16] singularity is now offline
[03:08:06] огыешсук is now offline
[03:10:19] fuzzy is now online
[03:29:09] fuzzy is now offline
[03:52:04] fuzzy is now online
[03:59:49] singularity is now online
[04:09:26] Сволота is now away
[04:16:27] fuzzy is now offline
[04:19:26] Сволота is now xa
[04:20:06] singularity is now online
[04:22:08] fuzzy is now online
[04:22:16] singularity is now online
[04:25:59] singularity is now online
[04:27:49] singularity is now offline
[04:28:20] singularity is now online
[04:29:18] singularity is now online
[04:32:14] Сволота is now online
[04:32:43] singularity is now online
[04:34:12] singularity is now online
[04:38:09] singularity is now online
[04:42:36] fuzzy is now offline
[04:51:41] singularity is now online
[05:01:26] Tony is now away
[05:17:45] Сволота is now offline
[05:24:26] Tony is now online
[05:54:32] blw0rm is now xa
[05:54:32] Tony is now online
[05:54:32] bliznezz is now away
[05:54:32] yugo-salem is now online
[05:54:32] ds.tihonov is now дома! :)
[05:54:32] mrDoctorWho is now xa
[05:54:32] Magister Yoda is now xa
[05:54:32] AlexZenon is now xa
[05:54:32] singularity is now online
[05:54:32] magic_pony is now online
[05:54:32] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[06:11:43] singularity is now offline
[06:25:37] fuzzy is now online
[06:28:50] mrDoctorWho is now online
[06:36:20] fuzzy is now online
[06:38:49] mrDoctorWho is now away
[06:41:43] fuzzy is now online
[06:46:03] fuzzy is now offline
[06:46:20] fuzzy is now online
[06:58:49] mrDoctorWho is now xa
[07:26:31] fuzzy is now online
[07:28:32] Tony is now away
[07:35:20] Tony is now online
[07:46:43] remo is now online
[08:06:43] fuzzy is now offline
[08:07:01] fuzzy is now online
[08:11:24] Tony is now away
[08:14:14] singularity is now online
[08:14:29] singularity is now offline
[08:18:11] fuzzy is now online
[08:26:26] Tony is now online
[08:27:18] fuzzy is now online
[08:27:49] fuzzy is now online
[08:27:52] magister is now online
[08:28:30] fuzzy is now online
[08:28:51] singularity is now online
[08:30:55] fuzzy is now online
[08:35:12] singularity is now offline
[09:05:21] blw0rm is now xa
[09:05:21] magister is now online
[09:05:21] bliznezz is now away
[09:05:21] Tony is now online
[09:05:21] yugo-salem is now online
[09:05:21] ds.tihonov is now дома! :)
[09:05:21] mrDoctorWho is now xa
[09:05:21] fuzzy is now online
[09:05:21] remo is now online
[09:05:21] Magister Yoda is now xa
[09:05:21] AlexZenon is now xa
[09:05:21] magic_pony is now online
[09:05:21] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[09:07:24] ambush is now online
[09:15:55] ambush is now away
[09:25:55] ambush is now xa
[09:28:10] fuzzy is now online
[09:28:21] ambush is now online
[09:33:21] ambush is now away
[09:43:21] ambush is now xa
[09:51:31] remo is now offline
[09:53:31] remo is now online
[09:53:39] fuzzy is now offline
[09:53:57] fuzzy is now online
[09:54:09] ambush is now online
[09:55:25] singularity is now online
[09:59:11] ambush is now away
[10:09:11] ambush is now xa
[10:18:39] ambush is now online
[10:23:37] singularity is now offline
[10:25:23] fuzzy is now offline
[10:28:55] fuzzy is now online
[10:32:53] огыешсук is now away
[10:44:51] mrDoctorWho is now online
[10:47:02] fuzzy is now offline
[10:48:41] ambush is now away
[10:58:41] ambush is now xa
[11:08:40] огыешсук is now away
[11:09:29] ambush is now online
[11:14:31] ambush is now away
[11:20:37] ambush is now online
[11:29:45] fuzzy is now online
[11:36:21] огыешсук is now online
[11:48:13] fuzzy is now offline
[11:58:53] ambush is now away
[11:59:47] ambush is now online
[12:19:03] AlexZenon is now offline
[12:22:05] mrDoctorWho is now away
[12:25:09] gigimon is now online
[12:30:37] fuzzy is now online
[12:34:51] огыешсук is now away
[12:37:52] огыешсук is now online
[12:39:40] gigimon is now online
[12:40:51] gigimon is now online
[12:42:04] mrDoctorWho is now xa
[12:49:08] gigimon is now offline
[12:51:25] fuzzy is now offline
[13:17:07] огыешсук is now away
[13:21:56] огыешсук is now offline
[13:27:39] mrDoctorWho is now online
[13:29:27] огыешсук is now online
[13:31:25] fuzzy is now online
[13:40:33] fuzzy is now offline
[13:40:35] fuzzy is now online
[13:41:13] ambush is now away
[13:46:16] fuzzy is now away
[13:46:26] fuzzy is now online
[13:49:17] ambush is now online
[13:50:36] ambush is now offline
[13:50:39] ambush is now online
[13:50:42] ambush is now online
[13:50:47] ambush is now online
[13:50:49] ambush is now online
[13:50:50] ambush is now online
[13:50:53] ambush is now online
[14:08:01] ambush is now offline
[14:08:21] yugo-salem is now offline
[14:17:34] remo is now offline
[14:23:31] огыешсук is now offline
[14:28:00] огыешсук is now online
[14:29:47] AlexZenon is now online
[14:32:23] огыешсук is now offline
[15:02:28] blw0rm is now xa
[15:02:28] Tony is now online
[15:02:28] magister is now online
[15:02:28] bliznezz is now away
[15:02:28] ds.tihonov is now дома! :)
[15:02:28] mrDoctorWho is now online
[15:02:28] fuzzy is now online
[15:02:28] Magister Yoda is now xa
[15:02:28] AlexZenon is now online
[15:02:28] magic_pony is now online
[15:02:28] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[15:19:45] vaal is now online
[15:31:19] vaal is now away
[15:40:42] vaal is now online
[15:42:43] mrDoctorWho is now offline
[15:45:44] vaal is now away
[15:47:08] vaal is now away
[15:47:08] vaal is now online
[16:00:15] fuzzy is now away
[16:20:50] fuzzy is now away
[16:20:53] fuzzy is now away
[16:20:54] fuzzy is now online
[16:24:58] dicos is now online
[16:35:02] fuzzy is now away
[16:44:38] fuzzy is now online
[16:50:29] fuzzy is now away
[16:52:58] fuzzy is now online
[16:54:44] Сволота is now online
[16:58:01] fuzzy is now away
[17:12:04] mrDoctorWho is now online
[17:14:38] Magister Yoda is now online
[17:16:38] Tony is now away
[17:17:07] fuzzy is now online
[17:24:11] fuzzy is now away
[17:30:26] fuzzy is now online
[17:38:26] mrDoctorWho is now offline
[17:41:02] mrDoctorWho is now online
[17:41:38] Tony is now xa
[17:51:36] fuzzy is now away
[18:21:47] blw0rm is now xa
[18:21:47] Сволота is now online
[18:21:47] Tony is now xa
[18:21:47] magister is now online
[18:21:47] vaal is now online
[18:21:47] bliznezz is now away
[18:21:47] ds.tihonov is now дома! :)
[18:21:47] mrDoctorWho is now online
[18:21:47] fuzzy is now away
[18:21:47] Magister Yoda is now online
[18:21:47] AlexZenon is now online
[18:21:47] dicos is now online
[18:21:47] magic_pony is now online
[18:21:47] : slav0nic установил(а) тему: python.su | Сначала поищи ответ на docs.python.org | Теперь поищи в google.com | Код постить в dumpz.org | Хочешь задать вопрос - просто *задай* его! | Правила написания хорошего кода: http://➡.ws/pep8 | Логи: http://logs.python.su
[18:25:37] fuzzy is now away
[18:26:13] dicos is now away
[18:26:15] dicos is now away
[18:26:26] fuzzy is now away
[18:26:58] dicos is now away
[18:27:00] dicos is now online
[18:54:43] dicos is now offline
[19:02:26] fuzzy is now away
[19:03:40] fuzzy is now away
[19:15:51] fuzzy is now away
[19:22:30] RanWise is now ** This message was blocked by the ICQ server **
[19:27:02] Tony is now online
[19:30:01] огыешсук is now online
[19:30:11] fuzzy is now away
[19:32:12] levsha is now online
[19:32:40] levsha is now offline
[19:34:28] RanWise is now offline
[19:47:13] singularity is now online
[19:47:54] singularity is now offline
[19:56:21] vaal is now away
[19:57:04] Tony is now away
[20:17:05] огыешсук is now online
[20:22:04] Tony is now xa
[20:31:39] vaal is now away
[20:31:39] vaal is now online
[20:32:16] mrDoctorWho is now away
[20:33:17] огыешсук is now offline
[20:35:52] Tony is now online
[20:36:40] vaal is now away
[20:36:40] vaal is now away
[20:39:25] singularity is now online
[20:39:40] Magister Yoda is now away
[20:41:59] mrDoctorWho is now online
[20:43:56] fuzzy is now online
[20:44:35] vaal is now away
[20:44:35] vaal is now online
[20:46:32] Magister Yoda is now online
[20:49:12] levsha is now online
[20:50:35] levsha is now online
[21:05:12] levsha is now offline
[21:16:38] singularity is now online
[21:20:14] vaal is now away
[21:23:37] огыешсук is now online
[21:25:13] vaal is now away
[21:25:13] vaal is now online
[21:30:59] vaal is now away
[21:30:59] vaal is now away
[21:35:04] singularity is now offline
[21:42:47] огыешсук is now away
[21:46:32] огыешсук is now online
[21:47:40] vaal is now online
[21:52:44] vaal is now away
[21:52:44] vaal is now away
[22:02:56] ambush is now online
[22:06:36] Tony is now away
[22:07:49] ambush is now away
[22:10:06] Tony is now online
[22:13:01] ambush is now online
[22:14:12] singularity is now online
[22:18:05] ambush is now away
[22:19:59] vaal is now online
[22:21:02] VeeSot is now online
[22:25:20] VeeSot: Доброго времени суток.Подскажите как решить задачу?
Есть очень большой (не влезает в память) файл логов вида:
username email datetime
Вася Петров vp@mail.ru 2014-01-31 13:00
Коля Петров kp@mail.ru 2014-02-21 13:00
Ваня Петров vp2@mail.ru 2013-03-31 13:00
Требуется написать программу, которая может отсортировать этот
файл по datetime.
Интерфейс программы:
merger.py [option] ... [P AT H_T O_F ILE]
Где возможные опции:
-n - количество воркеров
-m - ограничение по памяти на одного воркера (в Kb)
Разделители в файле – табуляция. Ограничение по памяти трактуется
как – общий размер логов в памяти.
Работающий вариант есть,но он страшно медленный и действует по принципу
1.Мы пробегаемся по файлу построчно и собираем данные из datetime.Создаем своеобразный индекс.(Костыльный метод)
2.Потом сортируем этот индекс через merge sort
3.Имеея отсортированый индекс иттерируемся по нему,используем текущее значение итератора для поиска строки в файле логов,и потом эту строку добавляем в новый файл.
Воркеры и прочие плюшки пока непринипиальны,главное придумать алгоритм сортировки.
[22:27:53] opka is now online
[22:27:59] opka: привет всем, вопрос
[22:28:02] огыешсук is now away
[22:28:05] ambush is now xa
[22:28:19] opka: у меня есть 5-6 питонофайлов, которые зают методы из одно файла
[22:28:40] opka: в каждом файле у меня однотипные except ErrorName:
[22:29:03] opka: их там штук 10 у меня чекается. Есть ли возможность подписать какой-то метод, который будет обрабатывать ошибки?
[22:29:40] opka: т.е. вместо кучи except идущих подряд сделать типа if exception call method() а в нем будет уже except ErrorName и блаблабла
[22:30:01] огыешсук is now online
[22:32:20] VeeSot: opka,хочется универсальный класс/файл включащий в себя обработчики исключений?
[22:38:54] ambush is now online
[22:43:47] opka: VeeSot: пока хочется избавиться от 10 except в каждом файле, заменив их всех 1-3 строками кода :) а сами except вынести куда-то. они увсех одинаковые
[22:43:56] opka: а каким образом сделать такое я хз :)
[22:44:01] VeeSot: opka, может https://github.com/VeeSot/maze/blob/master/user_map.py натолкнет на мысль.Кусок моей старой программы.
[22:44:47] VeeSot: Хотя мне сказали что фигней я страдаю и нарушаю приницип "единственного ответственного".
[22:45:05] огыешсук is now away
[22:45:17] opka: VeeSot: нет, не натолкнуло :)
[22:46:05] opka: хотя
[22:47:19] VeeSot: def size_maze(total_elements_in_string, number_string_in_file):
if total_elements_in_string > width:
exception = create_exception('ширину')
exception.incorrect_size()
elif number_string_in_file > height:
exception = create_exception('высоту')
exception.incorrect_size()
[22:47:23] VeeSot: Например.
[22:48:00] VeeSot: То бишь мы пробрасываем лишь параметр,остальное исключение генерирует само.
[22:48:14] vaal is now away
[22:48:14] vaal is now away
[22:49:00] vaal is now away
[22:49:00] vaal is now online
[22:53:45] singularity is now offline
[22:57:15] fuzzy is now away
[22:58:07] огыешсук is now away
[22:58:17] fuzzy is now online
[22:58:52] огыешсук is now online
[22:58:55] огыешсук is now online
[22:59:08] VeeSot is now away
[23:00:16] ambush is now away
[23:03:38] fuzzy is now away
[23:08:39] VeeSot is now online
[23:10:09] fuzzy is now away
[23:10:16] ambush is now xa
[23:10:44] opka: ну тобишь, это вместо except Exception: logging.error("") return false
[23:10:55] opka: будут вот такие вот твои строки :)) и причем в таком же количестве:)
[23:14:22] ambush is now online
[23:14:47] VeeSot is now offline
[23:19:18] vaal is now away
[23:19:19] vaal is now away
[23:19:26] ambush is now away
[23:23:01] singularity is now online
[23:23:04] ambush is now online
[23:23:32] Сволота is now away
[23:24:23] singularity is now offline
[23:25:16] fuzzy is now away
[23:25:22] fuzzy is now online
[23:25:23] mrDoctorWho is now offline
[23:25:30] Сволота is now online
[23:32:08] ambush is now away
[23:33:08] fuzzy: opka: if exception call method() что не так?
[23:34:00] fuzzy: VeeSoft: а чем тебе merge sort не подходит? разбей файл на кусочки, которые влазят в память сначала, отсортируй каждый в отдельный файл. а потом смержь файлы
[23:35:50] AlexZenon is now xa
[23:37:22] ambush is now online
[23:38:31] gigimon is now online
[23:39:56] fuzzy is now away
[23:42:48] ambush is now away
[23:46:25] fuzzy is now away
[23:48:04] ambush is now online
[23:56:25] fuzzy is now away