Skip to content

Instantly share code, notes, and snippets.

View DarwinSenior's full-sized avatar

Dingcheng Yue DarwinSenior

View GitHub Profile
map("K", "R");
map("J", "E");
map("u", "e");
map("H", "S");
unmap("C");
map("O", "on");
map("gi", "i");
map("ss", "se");
map("a", "og");
map("g^", "g0");
@DarwinSenior
DarwinSenior / proposition.md
Last active February 9, 2017 11:19
Specification for Remote UI for Rasa

General Protocol

There are two main parts of the protocol

  1. Receiving Event protocol.
  2. Update UI protocol.

Update Protocol

Currently we think the UI has the freedom to draw the screen however they want as long as both sides agrees on the content. I think each

#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [12pt,letterpaper]
#+latex_header: \input{/home/darwinsenior/workspace/cs446/cs446.tex}
#+LATEX_HEADER: \usepackage{placeins}
#+OPTIONS: toc:nil
#+begin_latex
\solution{Dingcheng Yue}{\today}{No 4}{Fall 2016}
\pagestyle{myheadings}
#+end_latex
We couldn’t find that file to show.
@DarwinSenior
DarwinSenior / trouble-shooting.sh
Last active October 12, 2016 15:26
ArchLinuxTroubleShooting
# this file helps to touble shoot the git file
# login failed every time
# it is mainly because the file failed at the kcheckpass, sticky bit problem
/usr/lib/kcheckpass # type your password and it is bound to fail
sudo chmod 4775 /usr/lib/kcheckpass # this will probably solves the problem
# reset network
# sometimes your network might failed and here is the simple solution
ip a # list all the network and I got something like enp3s0
@DarwinSenior
DarwinSenior / init.vim
Last active May 31, 2016 01:20
Git Initialisation
set laststatus=2
set number
set guitablabel=%N\ %t
set backspace=indent,eol,start
set whichwrap+=<,>,h,l
set nocompatible
set clipboard=unnamed
syntax on
let g:python_host_prog = '/usr/local/bin/python'
@DarwinSenior
DarwinSenior / Dockerfile
Last active January 22, 2016 05:40
dockerfile for firefly
# Pull base image.
FROM ubuntu
# Install Java.
RUN \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && \
import os
class Data(object):
def __init__(self, line):
self.parse(line)
def parse(line):
numbers = line.split(' ')
self.date = numbers[0]
self.open_price = float(numbers[1])
@DarwinSenior
DarwinSenior / index.html
Last active August 29, 2015 14:26
Clock experiment
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
</head>
<body>
<svg
height="200px" width="200px" background-color="grey" viewbox="-100 -100 200 200"
@DarwinSenior
DarwinSenior / main.py
Last active August 29, 2015 14:25
Github crawler
import sys, os
import request
import traceback
agent = request.default_agent
istart = int(sys.argv[1])
if not os.path.isdir('./data/'):
os.makedirs('./data/')