Skip to content

Instantly share code, notes, and snippets.

View Alien-Leon's full-sized avatar
💦
Learning

Leon Alien-Leon

💦
Learning
View GitHub Profile
// 消除后对应空位由上方元素填充
void dropdown()
{
vector<pair<int, int>> points;
for(int k = 0; k < n; k++) // 蛮力扫描所有列,效率待提高
{
int count = 0;
// 检查该列是否需要填充
for(int curi = m-1; curi >= 0; curi--)
{
@Alien-Leon
Alien-Leon / django.rules.yml
Created December 3, 2019 14:01
new prometheus rules for [django-prometheus](https://github.com/korfuri/django-prometheus)
groups:
- name: django.rules
rules:
- record: job:django_http_requests_before_middlewares_total:sum_rate30s
expr: sum(rate(django_http_requests_before_middlewares_total[30s])) BY (job)
- record: job:django_http_requests_unknown_latency_total:sum_rate30s
expr: sum(rate(django_http_requests_unknown_latency_total[30s])) BY (job)
- record: job:django_http_ajax_requests_total:sum_rate30s
expr: sum(rate(django_http_ajax_requests_total[30s])) BY (job)
- record: job:django_http_responses_before_middlewares_total:sum_rate30s