Skip to content

Instantly share code, notes, and snippets.

View veer66's full-sized avatar

Vee Satayamas veer66

View GitHub Profile
(ql:quickload 'str)
(defpackage #:cl-wordcut
(:use #:cl)
(:import-from #:str :join))
(in-package #:cl-wordcut)
(declaim (optimize (speed 3) (debug 0) (safety 0)))
(defconstant +default-dix-ptr-size+ 1024)
(mapcar #'(lambda (tu)
(cons (cons :initial-phrase-pairs (find-initial-phrase-pairs tu))
tu)) ...)
##################################
# ____________________________
# ( _________________________)
# ) (__ _ _ _ _
# ( __)( \/ )( \/\/ )/\/\
# ) ( \ / \ // \
# (___) \/ \/\/(_/\/\_) 2.6
#
#
# This is the default configuration file shipped with fvwm.
/mosesdecoder/scripts/training/train-model.perl
--external-bin-dir /mgiza/mgizapp/inst
--mgiza
--corpus /work/e1/a
--f en
--e th
--lm 0:8:/work/data/train-true-case-th.klm
#!/bin/sh
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
(require '[clojure.data.xml :as xml]
'[clojure.string :as str]
'[clojure.java.io :as io])
(defn ext-segs [segs]
(->> segs
(mapcat :content)
(str/join " ")))
(defn ext-tuv [tuv]
@veer66
veer66 / nrepl.sh
Last active February 13, 2020 17:50
#!/bin/sh
docker run \
--rm \
-it \
-u $(ls -n README.md | awk '{ print $3; }') \
--net=host \
-v $(pwd):/work \
-e HOME=/work \
-w /work \
@veer66
veer66 / pkg-install.el
Created November 8, 2019 15:49
เขียน script มา ไว้ install package ของ Emacs ที่ใช้บ่อย ๆ เอาไว้รันเวลาย้ายเครื่อง
;; This file: pkg-install.el
;;
;; How to run this:
;; emacs --batch --load pkg-install.el
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
(when no-ssl
(warn "\
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(ergoemacs-mode)