Skip to content

Instantly share code, notes, and snippets.

View Imperat's full-sized avatar

Mikhail Leliakin Imperat

View GitHub Profile
@Imperat
Imperat / BUG!
Created September 23, 2016 13:00
https://github.com/openstack/horizon/blob/master/horizon/workflows/base.py#L665 Hive!!!!!
  1. Learn modules organisation in Python
  2. Rewrite history for all Repos in GitHub.
  3. Translate all Russian to English
  4. Refactor all code
  5. Close session
Топ-5 лучших бомбардиров в каждом чемпионате! вух вух вух!
select Count(*) as count, Goal.author from Goal inner join Matches on match = Matches.ID
inner join League on Matches.league_id = League.id
where DATEDIFF(day,Matches.date, League.end_date)<32 group by author;
https://drive.google.com/open?id=0BwNoWPoDvuwaQVRJeWVMRnJtX00
\documentclass[bachelor, och, coursework, times]{SCWorks}
% параметр - тип обучения - одно из значений:
% spec - специальность
% bachelor - бакалавриат (по умолчанию)
% master - магистратура
% параметр - форма обучения - одно из значений:
% och - очное (по умолчанию)
% zaoch - заочное
% параметр - тип работы - одно из значений:
% referat - реферат
1. Проверить формулы.
2. Выровнять код.
3. Шаг 1 в приложение А.
4. Шаги остальные описать
5. Текстуренцию описать детально.
6. Пофиксить баги
def test_user_projects_admin_view(self):
translation.activate('en')
user = AutoFixture(
User, field_values={'password': 'password',
'is_staff': True,
'is_superuser': False}).create_one()
user.set_password('password')
user.save()
c = Client()
self.project1.admins.user_set.add(user)
1. Ссылки на кнопочках пагинашки вух вух
2. Назад и впреёд
3. Хлебные крошки в бок
@Imperat
Imperat / file
Last active November 18, 2016 09:12
{% for new in news_list|slice:"1:5" %}
<div class="index-news__col">
{% get_resolution forloop.counter0 as resolution %}
{% thumbnail new.image {% resolution %} crop="80% top" as im %}
<h5>{{ new.title }}</h5>
<span class="date orange">{{ new.date }}</span>
<span class="text">{{ new.description|striptags|truncatewords:12 }}</span>
<a href="{{new.get_absolute_url}}" class="more">{% trans "Подробнее" %}</a>
</div>
{% endfor %}
# coding: utf-8
import argparse
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import re
import urllib
import webbrowser
ADDRESS = 'https://habrahabr.ru'
PORT = 8000
HOST = 'localhost'