Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

Hai Liang Wang hailiang-wang

🌴
On vacation
View GitHub Profile
@hailiang-wang
hailiang-wang / fork forced sync
Created Oct 5, 2021 — forked from glennblock/fork forced sync
Force your forked repo to be the same as upstream.
View fork forced sync
git fetch upstream
git reset --hard upstream/master
@hailiang-wang
hailiang-wang / emulator-install-using-avdmanager.md
Created Oct 1, 2021 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)
View emulator-install-using-avdmanager.md

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

@hailiang-wang
hailiang-wang / kyteapos2en.pl
Created Jul 1, 2021 — forked from neubig/kyteapos2en.pl
A program to change KyTea's Japanese POS tags to english tags
View kyteapos2en.pl
#!/usr/bin/perl
# This is a script to change KyTea's POS tags in Japanese to English
# abbreviations
use strict;
use utf8;
use Getopt::Long;
use List::Util qw(sum min max shuffle);
binmode STDIN, ":utf8";
binmode STDOUT, ":utf8";
@hailiang-wang
hailiang-wang / concat.sh
Created Mar 28, 2020
Concat multi videos as one
View concat.sh
#! /bin/bash
###########################################
#
###########################################
# constants
baseDir=$(cd `dirname "$0"`;pwd)
# functions
# main
@hailiang-wang
hailiang-wang / default.conf
Created Oct 15, 2019
Nginx Configuration for 春松客服
View default.conf
server {
listen 443 ssl;
server_name YOUR_URL;
root /usr/share/nginx/html;
client_max_body_size 100M;
ssl_certificate /certs/YOUR.cer;
ssl_certificate_key /certs/YOUR.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
@hailiang-wang
hailiang-wang / Install NVIDIA Driver and CUDA.md
Created Jun 21, 2019 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
View Install NVIDIA Driver and CUDA.md
View ltp_parser.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#===============================================================================
#
# Copyright (c) 2017 <> All Rights Reserved
#
#
# File: /Users/hain/tmp/ltp_parser.py
# Author: Hai Liang Wang
# Date: 2018-04-12:18:49:38
View fitting-hyper-params.md
layout title excerpt category tags disqus
post
深度学习:调节网络超参数
在训练前,需要先规划超级参数,比如batch size, etc.
development
deeplearning
true

使用神经网络完成分类,物体识别,序列化标注,问答,生成式对话、翻译、摘要已成为标准手段,在训练神经网络时,一个很难的地方是怎么调试网络的超参数,超参数影响了网络的收敛速度,也影响最终的结果。

View gist:2c935182fb7213205284f7cd5040536a
"""A simple implementation of a greedy transition-based parser. Released under BSD license."""
from os import path
import os
import sys
from collections import defaultdict
import random
import time
import pickle
SHIFT = 0; RIGHT = 1; LEFT = 2;
@hailiang-wang
hailiang-wang / clusterdump.sh
Created Oct 24, 2017 — forked from zviri/clusterdump.sh
Mahout cheat-sheet
View clusterdump.sh
mahout clusterdump \
-dt sequencefile \ # format: {Integer => String}
-d reuters-vectors/dictionary.file-* \ # dictionary: {id => word}
-i reuters-kmeans-clusters/clusters-3-final \ # input
-o clusters.txt \ # output (local filesystem)
-b 10 \ # format length
-n 10 # number of top terms to print
--distanceMeasure org.apache.mahout.common.distance.CosineDistanceMeasure # default is euclidean distance