Skip to content

Instantly share code, notes, and snippets.

View TranBaVinhSon's full-sized avatar
🎯
Focusing

Tran B. V. Son TranBaVinhSon

🎯
Focusing
View GitHub Profile
package com.example.sontbv.retrofittutorial.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.example.sontbv.retrofittutorial.R;
from __future__ import print_function, division
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
num_epochs = 100
total_series_length = 50000
truncated_backprop_length = 15
state_size = 4
num_classes = 2
@TranBaVinhSon
TranBaVinhSon / powerlevel9k.config
Created April 27, 2018 12:08 — forked from athityakumar/powerlevel9k.config
Powerlevel9k oh-my-zsh theme configuration for screenshots used in https://github.com/athityakumar/colorls
export ZSH=$HOME/.oh-my-zsh
export DEFAULT_USER='athityakumar'
TERM=xterm-256color
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
@TranBaVinhSon
TranBaVinhSon / Casino.sol
Created May 15, 2018 19:27 — forked from anonymous/Casino.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.21+commit.dfe3193c.js&optimize=false&gist=
pragma solidity ^0.4.10;
contract Ownable {
address owner;
function Ownable() public {
owner = msg.sender;
}
modifier Owned {
require(msg.sender == owner);
@TranBaVinhSon
TranBaVinhSon / astar.py
Created May 26, 2018 19:04 — forked from jamiees2/astar.py
A* Algorithm implementation in python.
# Enter your code here. Read input from STDIN. Print output to STDOUT
class Node:
def __init__(self,value,point):
self.value = value
self.point = point
self.parent = None
self.H = 0
self.G = 0
def move_cost(self,other):
return 0 if self.value == '.' else 1
@TranBaVinhSon
TranBaVinhSon / block_schema.json
Created August 20, 2018 04:15 — forked from neewy/block_schema.json
A JSON schema for block in Iroha
{
"definitions": {},
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "http://example.com/example.json",
"type": "object",
"properties": {
"signatures": {
"$id": "/properties/signatures",
"type": "array",
"minItems": 1,
@TranBaVinhSon
TranBaVinhSon / rails http status codes
Created September 14, 2018 03:57 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
$ cat stable/genesis.block
{
"payload":{
"transactions":[
{
"payload":{
"reducedPayload":{
"commands":[
{
"addPeer":{
@TranBaVinhSon
TranBaVinhSon / .zshrc
Created February 7, 2019 01:30
Alias
# Docker
alias d='docker'
alias da='docker attach'
alias dr='docker restart'
alias dimg='docker images'
alias dps='docker ps'
alias dvol='docker volume ls'
alias dclearimg='docker rmi $(docker images --quiet --filter "dangling=true")'
alias dclearps='docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v'
alias dclearvol='docker volume rm $(docker volume ls -qf dangling=true)'
@TranBaVinhSon
TranBaVinhSon / transaction.go
Last active March 13, 2019 05:12
Transfer ethereum
package main
import (
"context"
"crypto/ecdsa"
"fmt"
"log"
"math/big"
"github.com/ethereum/go-ethereum/common"