I hereby claim:
- I am vladimirmyshkovski on github.
- I am myshkovski (https://keybase.io/myshkovski) on keybase.
- I have a public key ASAbLT2TKl_ilDTr_s4fS1tXQnYls32Za9T9L_yPgL94igo
To claim this, I am signing this object:
''' | |
Extracted and modified from django-model-logging | |
It used it's own LogEntry model but since django | |
has it's own LogEntry maybe someone would want to | |
register in the same model instead of creating a | |
new one. | |
''' | |
from django.contrib.admin.models import LogEntry, ADDITION, CHANGE, ContentType, DELETION | |
from django.utils.translation import gettext as _ |
"""Implement a memorable ID string. | |
The original idea for this comes from Asana where it is documented on their | |
blog: | |
http://blog.asana.com/2011/09/6-sad-squid-snuggle-softly/ | |
There are other partial implementations of this and can be found here: | |
Node.js: https://github.com/linus/greg | |
Java: https://github.com/PerWiklander/IdentifierSentence |
<template> | |
<v-avatar v-if="user !== null" | |
:size="size" | |
:style="{'background-color': backgroundColor}"> | |
<strong class="initials" | |
:style="{'color': fontColor, | |
'font-size': fontSize}"> | |
{{ (user.first_name[0] + user.last_name[0]) || '?' }} | |
</strong> |
package main | |
import ( | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
"golang.org/x/crypto/pbkdf2" | |
"strconv" | |
"strings" | |
) |
package djargon2i | |
import ( | |
"crypto/rand" | |
"crypto/subtle" | |
"encoding/base64" | |
"errors" | |
"fmt" | |
"strings" |
const MINUTE = 60, | |
HOUR = MINUTE * 60, | |
DAY = HOUR * 24, | |
YEAR = DAY * 365; | |
function getTimeAgo(date) { | |
const secondsAgo = Math.round((+new Date() - date) / 1000); | |
if (secondsAgo < MINUTE) { | |
return secondsAgo + "s"; |
# -*- coding: utf-8 -*- | |
import scrapy | |
import json | |
class FreelancerComRuSpider(scrapy.Spider): | |
name = 'freelancer_com_ru' | |
allowed_domains = ['www.freelancer.com.ru'] | |
iDisplayStart = 0 |
from scrapy.linkextractors import LinkExtractor | |
from scrapy.spiders import CrawlSpider, Rule | |
from scrapy.utils.markup import remove_tags | |
from freelance.scraper.scraper.items import OrderItem | |
class FreelansimSpider(CrawlSpider): | |
name = "freelansim" |
I hereby claim:
To claim this, I am signing this object:
# Функция рассчитывающая ex dividend date | |
def _ex_dividend_date_func(self): | |
if self.ex_dividend_date: | |
return self.ex_dividend_date | |
if self.dps == 0 and self.record_date is not None \ | |
or self.dps != 0 and self.record_date is None: | |
raise Exception('Record_date должен быть пустым, если dps = 0') | |
if self.dps == 0 or self.ticker.exchange is None: |