This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <set> | |
struct node{ | |
int id; | |
node* next; | |
}; | |
void func ( node* head ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf8 | |
[Base Component] | |
| # self:constructor(), — очень нужен; если не переопределено, то error("Not implemented") | |
| # self:render(), — очень нужен; если не переопределено, то error("Not implemented") | |
| | |
|-> [Base Field] | |
| | # self:constructor(), — очень нужен | |
| | # self:render(), — отрисовка | |
| | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
import collections | |
import types | |
import itertools | |
class SlidingWindow(collections.deque): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
# | |
# Graphite log simple parser. | |
# It parse functions and its arguments using python ast-tree. | |
# | |
# For each log line like: | |
# { | |
# 192.168.14.20 [23/Jul/2015:15:44:11 +0100] | |
# "GET /render?from=-4hours&noCache=True&hideLegend=False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Простой текстовый консольный видео-плеер. | |
// Выводит кадры в символьном представлении на стандартный вывод. | |
// Поддержки звука нет. | |
// | |
// Как пользоваться: | |
// | |
// $> go run simple-console-video-player.go /путь/до/видео-файла.mp4 | |
// | |
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Простой текстовый консольный видео-плеер. | |
Выводит кадры в символьном представлении на стандартный вывод. | |
Поддержки звука нет. | |
Как пользоваться: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import | |
import requests | |
import json | |
import copy | |
def get_in_dict(dict_, path): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import groupby | |
def dlist_sum_group( | |
target_dlist, | |
groupby_field_list = [], | |
sum_field_list = [], | |
field_list = [], | |
convert = tolong, | |
): | |
return dlist_agregate_group( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set session group_concat_max_len = 9223372036854775807; | |
set @expr = ( | |
select | |
group_concat( | |
concat( | |
'C.Expression REGEXP "P',PatternID, '[^0-9]"' | |
) | |
SEPARATOR ' or ' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load i18n %} | |
{% load i18n admin_urls admin_static admin_list %} | |
{{ spec.form.media }} | |
{% block extrahead %} | |
<style> | |
.calendarbox { | |
margin-left: -200px; |