Skip to content

Instantly share code, notes, and snippets.

View index.html
<!DOCTYPE html>
<html lang="ru">
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
<section id="id_about_section">
DrMartiner / default.conf
Created Sep 18, 2018
docker-compose.yml Nginx
View default.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
location / {
root /usr/share/nginx/html;
from pywallet import wallet
from transactions import Transactions
from bitcoinrpc.authproxy import AuthServiceProxy
BITCOIND_JSON_RPC_URL = 'http://user:pass@host:8332'
def create_wallet(seed: str=None, network: str='BTC', children=0) -> dict:
""" Step 1 """
if not seed:
DrMartiner /
Last active Feb 3, 2018
Use to create a wallet & make a transaction to testnet
import os
import requests
os.environ.setdefault('PYCOIN_DEFAULT_NETCODE', 'XTN')
os.environ.setdefault('PYCOIN_XTN_PROVIDERS', '')
from pycoin.key.electrum import ElectrumWallet
from pycoin.tx.tx_utils import (create_tx, sign_tx)
from import spendables_for_address
DrMartiner /
Created Dec 12, 2017
Poloniex profit monitor
from datetime import datetime
from time import sleep
from colorclass import Color
from poloniex import Poloniex
from terminaltables import AsciiTable
API_KEY = ""
polo = Poloniex(API_KEY, API_SECRET)
DrMartiner /
Last active Oct 22, 2017
Command for backups all media files
import os
import tarfile
import progressbar
import django.apps
from datetime import datetime
from import BaseCommand
from django.utils.encoding import smart_str
class Command(BaseCommand):
DrMartiner /
Created Jul 20, 2017
Put po files to shuup project
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import shutil
SHUUP_PATH = '~/.pyenv/versions/project/lib/python3.5/site-packages/shuup'
SOURCE_PATH = '~/projects/project'
DrMartiner /
Created May 12, 2017
Django's URL's error handlers
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
urlpatterns = [
# ...
handler400 = 'apps.common.views.handler400'
handler403 = 'apps.common.views.handler403'
DrMartiner /
Last active Mar 19, 2017
Create session for anonymous django users
# -*- coding: utf-8 -*
from __future__ import unicode_literals
import logging
from django.conf import settings
from importlib import import_module
engine = import_module(settings.SESSION_ENGINE)
SessionStore = engine.SessionStore
You can’t perform that action at this time.