This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; anything-c-yasnippet.el --- anything config for yasnippet.el | |
;; Author: Kenji.I (Kenji Imakado) <[email protected]> | |
;; Version: 0.6.1 | |
;; Keywords: anything yasnippet | |
;; This file is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation; either version 2, or (at your option) | |
;; any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
from pylab import * | |
import random | |
def mixture_gaussian(i): | |
pi_0 = 0.3 | |
if random.random() < pi_0: | |
return random.gauss(-5, 1) | |
else: | |
return random.gauss( 5, 4) |