Skip to content

Instantly share code, notes, and snippets.

View vladimirmyshkovski's full-sized avatar
🎯
Focusing

Vladimir Myshkovski vladimirmyshkovski

🎯
Focusing
View GitHub Profile
<div class="card p-3 mt-3 mb-3">
<div class="col-sm-12">
<div class="text-center">
<h3>Основные условия выдачи займа</h3>
</div>
<table class="table table-striped table-hover">
<tbody>
<tr>
<td><h5>Размер займа</h5></td>
<td>От {{ self.amount_from | floatformat:"0" }} до {{ self.amount_to | floatformat:"0" }} рублей</td>
.reply_markup_button:focus, .reply_markup_button:hover {
color: #3a6d99;
background: #dfe8f0;
}
.reply_markup_h2 .reply_markup_button {
height: 81px;
}
.btn.active, .btn.active:focus, .btn:active, .btn:active:focus, .btn:focus, .btn:hover, .open .btn.dropdown-toggle {
-webkit-box-shadow: none;
-moz-box-shadow: none;
class Publisher(CBModel):
class Meta:
abstract = True
doc_type = 'publisher'
id_prefix = 'pub'
bucket = "MAIN_BUCKET"
name = models.CharField(max_length=45, null=True, blank=True)
@vladimirmyshkovski
vladimirmyshkovski / exceptions.py
Last active October 5, 2018 22:36
Custom exception
class BaseCustomerError(Exception):
"""Basic error for all Customer errors."""
pass
class CreateNewStepError(BaseCustomerError):
"""Exception raised when trying to create a new CustomerStep.
Attributes:
message -- explanation of the error
{'api_exist': False,
'categories': ['16'],
'description': '<ul>\r\n'
'\t<li>Одобрение за 10 минут</li>\r\n'
'\t<li>Получение по двум документам</li>\r\n'
'\t<li>Годовая ставка по кредиту: 11,9%</li>\r\n'
'\t<li>Сумма кредита: от 30 000 до 700 000 рублей</li>\r\n'
'\t<li>Срок кредита: 24, 36, 48, 60 месяцев</li>\r\n'
'</ul>\r\n'
'<p>\r\n'
@vladimirmyshkovski
vladimirmyshkovski / gulpfile.js
Created August 12, 2018 14:35
Remove unused css from index.html
////////////////////////////////
//Setup//
////////////////////////////////
// Plugins
var gulp = require('gulp'),
pjson = require('./package.json'),
uncss = require('postcss-uncss'),
comments = require('postcss-discard-comments'),
cssnext = require('postcss-cssnext'),
from web3 import Web3, HTTPProvider
from web3.middleware import geth_poa_middleware
NET = 'rinkeby'
INFURA_API_KEY = ''
ETHERSCAN_API_KEY = ''
import requests
from web3 import Web3, HTTPProvider
from web3.middleware import geth_poa_middleware
from django.conf import settings
import requests
NET = 'rinkeby'
INFURA_API_KEY = 'Твой infura.io API KEY'
ETHERSCAN_API_KEY = 'Твой etherscan.com API KEY'
import asyncio
import aiohttp
import bs4
import tqdm
@asyncio.coroutine
def get(*args, **kwargs):
response = yield from aiohttp.request('GET', *args, **kwargs)
return (yield from response.read_and_close(decode=True))
var testVar;
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4 && (xmlhttp.status == 200 || xmlhttp.status == 201)){
testVar = xmlhttp.responseText
}
}
xmlhttp.open(String(method), url, true);
xmlhttp.setRequestHeader("Content-Type", "application/json");
xmlhttp.setRequestHeader("Authorization", "Token {{ token }}");
xmlhttp.send(data);