Skip to content

Instantly share code, notes, and snippets.

@liuhoward
liuhoward / selenium_basics.py
Created July 25, 2019 16:55 — forked from nrrb/selenium_basics.py
Selenium stuffs
from selenium import webdriver
profile = webdriver.FirefoxProfile()
# Set proxy settings to manual
profile.set_preference('network.proxy.type', 1)
# Set proxy to Tor client on localhost
profile.set_preference('network.proxy.socks', '127.0.0.1')
profile.set_preference('network.proxy.socks_port', 9050)
# Disable all images from loading, speeds page loading
# http://kb.mozillazine.org/Permissions.default.image
@liuhoward
liuhoward / letor_metrics.py
Created May 30, 2019 03:25 — forked from mblondel/letor_metrics.py
Learning to rank metrics.
# (C) Mathieu Blondel, November 2013
# License: BSD 3 clause
import numpy as np
def ranking_precision_score(y_true, y_score, k=10):
"""Precision at rank k
Parameters
@liuhoward
liuhoward / Makefile
Created October 26, 2017 21:11 — forked from gpoo/Makefile
A Makefile to compile latex slides and build handouts (assuming the use of beamer)
latexfile = openaccess
LATEX = xelatex
$(latexfile).pdf: $(latexfile).tex
$(LATEX) $<
notes: $(latexfile)_withnotes.pdf
all: $(latexfile).pdf notes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@liuhoward
liuhoward / .jdk1.8.jinfo
Created December 20, 2016 03:09 — forked from olagache/.jdk1.8.jinfo
Generate ".jdk1.8.jinfo" and "alternatives.sh" files to install java 8 using ubuntu alternatives.
alias=jdk1.8
section=non-free
jre servertool /usr/lib/jvm/jdk1.8/jre/bin/servertool
jre keytool /usr/lib/jvm/jdk1.8/jre/bin/keytool
jre java /usr/lib/jvm/jdk1.8/jre/bin/java
jre jcontrol /usr/lib/jvm/jdk1.8/jre/bin/jcontrol
jre rmid /usr/lib/jvm/jdk1.8/jre/bin/rmid
jre ControlPanel /usr/lib/jvm/jdk1.8/jre/bin/ControlPanel
jre rmiregistry /usr/lib/jvm/jdk1.8/jre/bin/rmiregistry
jre orbd /usr/lib/jvm/jdk1.8/jre/bin/orbd

SlickEdit

SlickEdit

  • Editor Emulation: 可以模拟各种编辑器, 如: VIM, Emacs等, 我先选了CUA, 就是跟office word一致的快捷键方式.
  • Color Scheme: 我选择了一个墨绿色背景的 Chalkboard, google了一下发现 GitHub Gist上面有一些人自己的设置, 以后可以去参考别人的定制一下.
  • Fonts(字体): 还是选择我习惯的Consolas, 顺便用MacType渲染了一下, 弄了下Source Code Pro, 感觉和Consolas差不多(Mac下面没有consolas头疼)

Config

  1. 工具栏图标设置为小(因为工具栏都是最常用的功能实在找不到不用快捷键而使用它们的理由)