Skip to content

Instantly share code, notes, and snippets.

@ducnh1022
ducnh1022 / ser.py
Created July 17, 2019 04:53
service for scoring
from flask import Flask, url_for
from flask import request
from flask import json
from flask import Response
from flask import jsonify
from gevent.pywsgi import WSGIServer
import mysql.connector
from mysql.connector import Error
var loadingDiv = document.createElement("div");
loadingDiv.style="background:white ;border: 1px solid Black; position: fixed; top: 50%; left: 50%; padding: 20px; z-index: 100; display:flex; flex-direction: row; align-items: center;";
document.body.append(loadingDiv);
var loadingImg = document.createElement("img");
loadingImg.src="https://steamcommunity-a.akamaihd.net/…/…/login/throbber.gif";
var loadingText = document.createElement("div");
loadingText.textContent = "loading matches please wait...";
loadingText.style = "margin-right: 10px;";
@ducnh1022
ducnh1022 / gist:df09c4fe558dd9019392e7801e57b678
Created April 15, 2018 17:15
Blockchain paper pdf list
Proof of stake - Casper
https://tendermint.com/static/docs/tendermint.pdf
https://arxiv.org/pdf/1406.5694.pdf
https://github.com/ethereum/research/blob/master/papers/CasperTFG/CasperTFG.pdf
https://github.com/ethereum/research/blob/master/papers/casper-basics/casper_basics.pdf
https://github.com/ethereum/research/blob/master/papers/casper-economics/casper_economics_basic.pdf
https://github.com/ethereum/research/blob/master/papers/cbc-consensus/AbstractCBC.pdf
https://github.com/ethereum/research/blob/master/papers/censorship_rejection/censorship_rejection.pdf
https://github.com/ethereum/research/blob/master/papers/other_casper/discouragement.pdf
Verifying my Blockstack ID is secured with the address 1E4LMRyD9DFvMcUh3cBMStEnqxSxELdpgU https://explorer.blockstack.org/address/1E4LMRyD9DFvMcUh3cBMStEnqxSxELdpgU
@ducnh1022
ducnh1022 / ETHLend Whitepaper Translation.txt
Created November 28, 2017 14:29
ETHLend Whitepaper Translation
# ETHLend.io White Paper - Democratizing Lending
19 November 2017
<p>Abstract: ETHLend.io introduces decentralized lending on Ethereum network by using ERC-20 compatible tokens or Ethereum Name Service (ENS) domains as a collateral. ETHLend solves the problem on reducing the loss of loan capital on default. On healthy loan relationships the loan is paid back. However, the pseudo-anonymous nature of Ethereum blockchain network opens the possibility to avoid repayment of the loan since the lender might not have all the necessary details of the borrower to enforce the debt in the borrower's jurisdiction. Moreover, enforcement in a decentralized environment, where the parties can be from any part of the world, might not be efficient. ETHLend provides decentralized solutions to avoid loss of capital and to make one true global lending market available.</p>
<p>Copyright 2017 ETHLend.io</p>
<p>Without explicit permission, anyone has the right to use, reproduce or distribute any material in this white paper for n
@ducnh1022
ducnh1022 / Translation for ETHLend WEB
Created November 27, 2017 02:50
Translation for ETHLend WEB
msgstr ""
msgstr "Tiếng Anh"
msgstr "Tiếng Tây Ban Nha"
msgstr "Tiếng Trung Quốc"
msgstr "Tiếng Đức"
msgstr "Tiếng Hàn"
msgstr ""
msgstr ""
msgstr ""
msgstr ""
@ducnh1022
ducnh1022 / gist:9a60049890e955b6da6e1eb693bad432
Last active April 10, 2016 19:48
Classification week 7 Scaling to huge dataset and online learning
gradient descent wont scale
Stochastic gradient use 1 data point, on average, it increases likelihood, sometimes decrease, "noisy" convergence
@ducnh1022
ducnh1022 / gist:a7e8599c422aa9c9474bf42b85b1cdd8
Created April 10, 2016 08:21
Classification week 6 precision recall
Precision: fraction of positive predictions that are actually positive
recall: fraction of positive data predicted to be positive
optimistic = low precision high recall
pesstimistic = high precision low recall
trade off
Logític clasìication -> stochastic ooptimization
-> data and parameter tuning -> deep networks
-> regularization -> convolutional networks
-> embeddings -> recurrent models
deep learning apply in all field, reasearcher, engineer, data scientist
@ducnh1022
ducnh1022 / gist:41f2389f7f19ff3542dd33431ce5365b
Last active April 6, 2016 15:36
Classification week 5 boosting
combine multiple simple classifier -> ensemble classifiers
y hat = sign(f(x))
Adaboost
start same weight for all points alpha = 1/N
For t = 1..T
learn f(t) with data weight alpha