Skip to content

Instantly share code, notes, and snippets.

@githubutilities
githubutilities / letor_metrics.py
Created Jun 15, 2017 — forked from mblondel/letor_metrics.py
Learning to rank metrics.
View letor_metrics.py
# (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
View rank_metrics.py
"""Information Retrieval metrics
Useful Resources:
http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt
http://www.nii.ac.jp/TechReports/05-014E.pdf
http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf
http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf
Learning to Rank for Information Retrieval (Tie-Yan Liu)
"""
import numpy as np
View README.markdown

jumbo

A package management system which allows installation to non-system location.

点此 为 jumbo 捐款!

jumbo 是什么?

jumbo 是一个适用于百度测试机环境的包管理工具, 使用它可以方便地管理各种软件包. 真的, 不会再有比这个更方便的管理工具了!

View disable-android-pattern-code.md
View iOS-penetration-test.md

Install Penetration Env

# install ruby
wget http://apt.saurik.com/cydia/debs/ruby_1.8.6-p111-5_iphoneos-arm.deb
wget http://apt.saurik.com/cydia/debs/rubygems_1.2.0-3_iphoneos-arm.deb

dpkg -i ruby_1.8.6-p111-5_iphoneos-arm.deb
dpkg -i rubygems_1.2.0-3_iphoneos-arm.deb
@githubutilities
githubutilities / sniffing.md
Last active Jul 12, 2016
Jailbreak network sniffing
View sniffing.md
View ubuntu-tweek.sh
#!/bin/bash
# sudo apt-get install xdotool
xdotool search --class "$@" windowactivate %@
# if [ $# -ne 1 ];then
# echo -e "Usage: `basename $0` PROGRAM_NAME\n
# For example:\n\t
# '`basename $0` gnome-terminal' for Terminal\n\t
View get-and-build-crfsuite.sh
#! /usr/bin/env bash
#sudo apt-get install --yes autoconf
WORKING_DIR=`pwd`
LIBLBFGS_GIT=https://github.com/chokkan/liblbfgs.git
LIBLBFGS_SRC_DIR=./liblbfgs/
LIBLBFGS_INSTALL_DIR=$WORKING_DIR/local/lbfgs/
CRFSUITE_GIT=https://github.com/chokkan/crfsuite.git
CRFSUITE_SRC_DIR=./crfsuite/
View ubuntu-freeze.md

Ubuntu Freeze

1. kill command

2. sudo service lightdm restart

3.REISUB when freezes

Alt + SysReq + REISUB

R: Switch to XLATE mode
View mongo-cheatsheet.sh
# Export to json
mongoexport -d <database> -c <collection> -o <out-file>
# Export to csv
mongoexport --csv -o <out-file> -d <database> -c <collection> -f <field-1>, <field-2>
# Import from json
mongoimport -d <database> -c <collection> <in-file>
# Import from csv