Skip to content

Instantly share code, notes, and snippets.

@Arti3DPlayer
Arti3DPlayer / Дневник Еврея
Last active July 6, 2017 17:03
Дневник Еврея
https://itunes.apple.com/ru/app/jewish-diary/id1225292910?mt=8
sum_ = sum(result.values())
for i in result:
try:
result[i] = int((kwargs[i] * 100 / sum_).quantize(Decimal('.0000'), rounding=ROUND_UP))
except InvalidOperation:
result[i] = 0
total_percents = sum(result.values())
# -*- coding: utf-8 -*-
import random
import vk_api
import soundcloud
import urllib
import urllib2
import time
import hashlib
import json
# -*- coding: utf-8 -*-
import json
from django.utils import timezone
from django.shortcuts import redirect, get_object_or_404, render_to_response, \
RequestContext
from django.core.urlresolvers import reverse, reverse_lazy
from django.db import IntegrityError
from django.http import Http404, HttpResponse, HttpResponseRedirect