Skip to content

Instantly share code, notes, and snippets.

View luyifan's full-sized avatar

Lu Yifan luyifan

  • Zhejiang University
  • Hang Zhou,Zhejiang
View GitHub Profile
@yongsun
yongsun / mmseg.py
Created June 21, 2013 02:23
implement mmseg Chinese word segmentation algorithm (http://technology.chtsai.org/mmseg/) with Python, dictionary file and character frequencies from mmseg4j project.
#!/usr/bin/python
# -*- encoding: UTF-8 -*-
import codecs
import sys
from math import log
from collections import defaultdict
class Trie (object):
class TrieNode:
@ryin
ryin / tmux_local_install.sh
Last active April 23, 2024 01:06
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8