Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Ted Yin Determinant

🎯
Focusing
Block or report user

Report or block Determinant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:cda8f040bde0bd9839b7

Enhanced Calculator Project

Overview

Write an S-expression_ calculator with following functionalities:

  • Reads the expressions from stdin and prints the output to stdout
    • Note that you should guarantee that your program only writes revelant
View gist:8b9e124dc245d9818fa4
#include <cstdio>
#include <cassert>
#include <cctype>
#include <cstring>
#include <cstdlib>
#define SCAST_FLOAT(x) static_cast<Float*>(x)
#define SCAST_INT(x) static_cast<Int*>(x)
/* Abstract interface for numbers */
View gist:81702d8cc5eaefee277d

PPCA for IEEE 2014 Arrangement & Schedule

Teaching Assistants

Yiming Liu & Xutong Chen:Exams (problem sets and lectures)
Ted Yin & Tongliang Liao:The Project
Jiachen Shi:Lectures on Programming Skills
View gist:7ec0400e9be60364f94e

How to Configure AppArmor on Ubuntu

Author: Ted Yin <ted.sybil@gmail.com>
  • AppArmor is a Mandatory Access Control (MAC) system which is a kernel (LSM) enhancement to confine programs to a limited set of resources. Instead of binding access control attributes to users, it confines specific programs.
  • AppArmor is shipped with Ubuntu, which means it is fairly easy to get started.
  • In order to ease the maintenance, we first install the utilities by sudo apt-get install apparmor-utils
@Determinant
Determinant / log.rst
Created Jul 20, 2014
Log of My Academic Life
View log.rst

Log of My Academic Life

Sun Jul 20

  • kaldi
    • 完成kaldi动态链接
    • 几经周折后,在小集群上重现
@Determinant
Determinant / simple_spec.c
Last active Aug 29, 2015
Simple Spec -- A Simple Discrete-time STFT Program.
View simple_spec.c
#include <math.h>
#include <sndfile.h>
#include <string.h>
#include <assert.h>
#include <getopt.h>
#define PI 3.141592653589793
#define EPS 1e-8
#define MAX_BIN_NUM 65536
/* SHIFT_NUM should be less than or equal to BIN_NUM */
View config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@Determinant
Determinant / append-ivectors.cc
Created Aug 17, 2015
Concatenate features with speaker level ivector
View append-ivectors.cc
#include "base/kaldi-common.h"
#include "util/table-types.h"
#include "util/parse-options.h"
#include <map>
using namespace kaldi;
const char *usage =
"Concatenate features with speaker level ivector (e.g. appending speaker\n"
"ivector to each frame of the corresponding utterance)\n"
"Usage: append-ivectors <ivector-rspecifier> <utt2spk-rspecifier> <in-rspecifier2> <out-wspecifier>\n\n"
View Game2048.java
/*
* Author: Ted Yin (Maofan Yin) <ted.sybil@gmail.com>
* Description: Implementation for performing a move in direction left in 2048 game
*/
class Game2048 {
public int moveLeft(int[][] b, int i) {
int bonus = 0;
int h = 0; /* b[i][0..h-1] has its final value and cannot be changed
again (exactly the same definition in your hint) */
View cvimrc
imap <C-h> deleteChar
imap <C-w> deleteWord
unmap x
map d closeTab
map u lastClosedTab
map <C-u> scrollPageUp
map <C-d> scrollPageDown
map <C-p> J
map <C-n> K
set smoothscroll
You can’t perform that action at this time.