Skip to content

Instantly share code, notes, and snippets.

View Digo's full-sized avatar

Di Wang Digo

  • Carnegie Mellon University
  • Pittsburgh, PA, USA
View GitHub Profile
@Digo
Digo / gist:5445968
Last active December 16, 2015 13:59
ConnectionOptions connOptions = new ConnectionOptions();
connOptions.setCorpusUrl(ldcServerUrl);
connOptions.setCachingStrategy(mysqlCachingStrategy);
//Connects to a remote corpus server
AnnotatedCorpus aRemoteCorpus = CorpusManager.connect(connOptions);
//Query remote corpus and return a new corpus object
AnnotatedCorpus hitlistCorpus = aRemoteCorpus.subCorpus(keytermQuery);
"o((>ω< ))o"
( ิΘ㉨Θ)ิ
( *^-^)ρ(*╯^╰)
( *^-^)ρ(^0^* )
( *⊙~⊙)
( *′д)/o(_ _)ozzZZ…
( *︾▽︾)
( * ̄▽ ̄)((≧︶≦*)
( * ̄▽ ̄)o ─═≡※:☆▆▅▄▃▂_
( *・ω・)✄╰ひ╯
#### Start IPython, generate SHA1 password to use for IPython Notebook server
$ ipython
Python 2.7.5 |Anaconda 1.8.0 (x86_64)| (default, Oct 24 2013, 07:02:20)
Type "copyright", "credits" or "license" for more information.
IPython 1.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
@Digo
Digo / .bashrc
Last active February 10, 2020 18:20
git alias
alias gps='git push'
alias gpl='git pull'
alias gb='git branch'
alias gc='git checkout'
alias gm='git commit -m'
alias gma='git commit -am'
alias gmps='git commit -am "$(curl -s http://whatthecommit.com/index.txt)" && git push'
alias gd='git diff'
alias gs='git status'
alias gra='git remote add'
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
curl -O http://us.download.nvidia.com/tesla/440.33.01/nvidia-driver-local-repo-ubuntu1804-440.33.01_1.0-1_amd64.deb
sudo dpkg -i nvidia-driver-local-repo-ubuntu1804-440.33.01_1.0-1_amd64.deb
sudo apt-key add /var/nvidia-driver-local-repo-440.33.01/7fa2af80.pub
sudo apt-get update
sudo apt-get install -y cuda-drivers
@Digo
Digo / wsl2-ssh.ps1
Last active November 17, 2022 08:45
Setup SSH Server for WSL2
# check ssh availability
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
# Install SSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# Start the SSH Server
Start-Service sshd
Get-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
// ==UserScript==
// @name 不要百度知道
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 方便从百度知道复制内容
// @author tumuyan
// @match https://zhidao.baidu.com/question/*
// @grant none
// ==/UserScript==