https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
docker --version
docker container --help
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
docker --version
docker container --help
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
from flask import Flask, jsonify, request | |
from flask_sqlalchemy import SQLAlchemy | |
import uuid | |
app = Flask(__name__) | |
db = SQLAlchemy(app) | |
app.config['SECRET_KEY']='secret' | |
app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///app.db' |
This workshop is targeted at developers who are transitioning from Web2 to Web3 or have just recently gotten into Web3 and are looking to have a well-rounded foundation.
This first workshop is Series 1 in the three-part series that aims to introduce you to the blockchain and how to build on the blockchain.
import logging | |
import os | |
import grpc | |
from protos import hello_pb2, hello_pb2_grpc | |
def run(): | |
with grpc.insecure_channel('localhost:50051') as channel: | |
stub = hello_pb2_grpc.GreeterStub(channel) | |
response = stub.SayHello(hello_pb2.HelloRequest(name='John Doe', age=30)) | |
print("Greeter client received: " + response.message) |
def get_filepath(filename, extension): | |
return f'{filename}{extension}' | |
class Greeter(hello_pb2_grpc.GreeterServicer): | |
.... | |
def UploadFile(self, request_iterator, context): | |
data = bytearray() | |
filepath = 'dummy' |
from concurrent import futures | |
import logging | |
import os | |
import grpc | |
from protos import hello_pb2, hello_pb2_grpc | |
def get_filepath(filename, extension): | |
return f'{filename}{extension}' |
import logging | |
import os | |
import grpc | |
from protos import hello_pb2, hello_pb2_grpc | |
def get_filepath(filename, extension): | |
return f'{filename}{extension}' | |
def read_iterfile(filepath, chunk_size=1024): |