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
https://itunes.apple.com/ru/app/jewish-diary/id1225292910?mt=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
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()) |
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: utf-8 -*- | |
import random | |
import vk_api | |
import soundcloud | |
import urllib | |
import urllib2 | |
import time | |
import hashlib | |
import json |
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: 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 |