This file contains hidden or 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
| helm install first-release nginx-stable/nginx-ingress -n nginx-ingres | |
| kubectl create ns test1 | |
| kubectl apply -f deployment.yaml service.yml ingress.yml |
This file contains hidden or 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
| from aiohttp import web, ClientSession | |
| async def handler(request): | |
| async with ClientSession() as session: | |
| async with session.post("http://service/path", json={"key": "value"}) as response: | |
| if response.status in [200, 201]: | |
| data = await response.json() | |
| result = data.get("result", False) |
This file contains hidden or 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
| from django.conf.urls import url | |
| from django.contrib.staticfiles import views | |
| urlpatterns = [ | |
| url(r'^static/(?P<path>.*)$', views.serve, {'insecure': True}), | |
| ] |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="ru"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Home</title> | |
| <link rel="stylesheet" type="text/css" href="style.css" /> | |
| </head> | |
| <body> | |
| <section id="id_about_section"> |
This file contains hidden or 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
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server; | |
| location / { | |
| root /usr/share/nginx/html; | |
| } | |
| } |
This file contains hidden or 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
| 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: |
This file contains hidden or 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
| import os | |
| import requests | |
| os.environ.setdefault('PYCOIN_DEFAULT_NETCODE', 'XTN') | |
| os.environ.setdefault('PYCOIN_XTN_PROVIDERS', 'chain.so') | |
| from pycoin.key.electrum import ElectrumWallet | |
| from pycoin.tx.tx_utils import (create_tx, sign_tx) | |
| from pycoin.services import spendables_for_address |
This file contains hidden or 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
| from datetime import datetime | |
| from time import sleep | |
| from colorclass import Color | |
| from poloniex import Poloniex | |
| from terminaltables import AsciiTable | |
| API_KEY = "" | |
| API_SECRET = '' | |
| polo = Poloniex(API_KEY, API_SECRET) |
This file contains hidden or 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
| import os | |
| import tarfile | |
| import progressbar | |
| import django.apps | |
| from datetime import datetime | |
| from django.core.management.base import BaseCommand | |
| from django.utils.encoding import smart_str | |
| class Command(BaseCommand): |
This file contains hidden or 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
| #!/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' |
NewerOlder