Skip to content

Instantly share code, notes, and snippets.

View heronyang's full-sized avatar
😶
No Regrets

Heron Yang heronyang

😶
No Regrets
View GitHub Profile
#!/usr/bin/env python3
"""
This script reads the TSV-format content from clipboard and plots multiple
graphs for helping the user to visualize the bill.
"""
import clipboard
import matplotlib.pyplot as plt
import pandas as pd
from dateutil.parser import parse
#!/usr/bin/env python3
"""
This script enables the user first copy the bill statement lines from its PDF
file then coverts it to a TSV format, which can be directly pasted into a
spreadsheet application such as Google Sheets.
"""
import clipboard
OUTPUT_FILENAME = 'reformatted.tsv'
#!/usr/bin/env python3
"""
Test file for the blockchain basic functions.
"""
import unittest
from chain import Block, Chain
class Test(unittest.TestCase):
"""
"""
Implementation of the simple and basic block chain objects.
"""
import hashlib
from datetime import datetime
DIFFICULTY = 4
class Block():
ア段 イ段 ウ段 エ段 オ段
ア行
カ行
サ行
タ行
ナ行
ハ行
マ行
ヤ行
あ段 い段 う段 え段 お段
あ行
か行
さ行
た行
な行
は行
ま行
や行
a段 i段 u段 e段 o段
a行 a i u e o
ka行 ka ki ku ke ko
sa行 sa shi su se so
ta行 ta chi tsu te to
na行 na ni nu ne no
ha行 ha hi fu he ho
ma行 ma mi mu me mo
ya行 ya yu yo
@heronyang
heronyang / undertwoPostParamParser.java
Created April 4, 2018 20:59
The "HttpServerExchange" object in undertow doesn't provide direct interface for retrieving the parameters for POST requests, so there's the helper functions for getting the POST parameters.
final private FormParserFactory parserFactory =
FormParserFactory.builder().build();
interface GetPostParameterCallback {
void done(Map<String, Object> params);
}
private void getPostParameters(HttpServerExchange exchange,
final GetPostParameterCallback callback) {
try {
@heronyang
heronyang / Macro
Last active November 15, 2017 04:06
Sub Splitbook()
Dim vis As Long, xPath As String, xWs As Worksheet
xPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
i = 1
For Each xWs In ThisWorkbook.Sheets
vis = xWs.Visible
sudo apt-get update
sudo apt-get install -y python-pip
pip install --upgrade pip
pip install --user tensorflow tensor2tensor
PROBLEM=translate_enzh_wmt8k
MODEL=transformer
HPARAMS=transformer_base_single_gpu
DATA_DIR=$HOME/t2t_data