Skip to content

Instantly share code, notes, and snippets.

@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f
@luw2007
luw2007 / 词性标记.md
Last active November 12, 2024 11:43
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

  • 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
  • 虚词:副词、介词、连词、助词、拟声词、叹词。

ICTPOS3.0词性标记集

n 名词

nr 人名

@fatih
fatih / ring.go
Created December 24, 2013 00:47
container/ring example golang
package main
import (
"container/ring"
"fmt"
"time"
)
func main() {
coffee := []string{"kenya", "guatemala", "ethiopia"}
@huowa222
huowa222 / gist:9640835
Created March 19, 2014 12:39
similarity caculation Mahout Apache OpenSource
Apache Mahout 是 ApacheSoftware Foundation (ASF) 旗下的一个开源项目,提供一些可扩展的机器学习领域经典算法的实现,旨在帮助开发人员更加方便快捷地创建智能应用程序,并且,在 Mahout 的最近版本中还加入了对Apache Hadoop 的支持,使这些算法可以更高效的运行在云计算环境中。
在现实中广泛使用的推荐系统一般都是基于协同过滤算法的,一般分为基于用户(user)的协同过滤算法和基于项目(item)的协同过滤算法,这类算法通常都需要计算user和user,item和item之间的相似度,对于不同的数据量和不同类型的数据源,都需要不同的相似度计算方法来提高推荐性能和提高推荐的准确度,幸好在mahout中提供了大量的计算相似度的组件,这些组件实现了一些不同的相似度计算方法:
如图1:基于user的相似度计算
1.Pearson correlation-based similarity(皮尔森用户协同推荐算法)(一般不建议使用)
(PearsonCorrelationSimilarity) 根据用户对于物品的喜好分数进行用户的打分进行推荐,用户之间的相似度从-1~1
@chrisgillis
chrisgillis / ssl_smtp_example.go
Created April 16, 2014 14:48
Golang SSL SMTP Example
package main
import (
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"crypto/tls"
)
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@andresbott
andresbott / gist:b5586fadc36ba46fdac1
Created January 19, 2016 01:49
Solve mppe_compress[0]: osize too small! (have: 1408 need: 1412)
taken from: http://danielsokolowski.blogspot.com.es/2013_04_01_archive.html
This due to the way MPPE Microsoft point-to-point Encryption encodes data which results in the packet size being bigger then what was agreed in the VPN handshake - is my guess. There is a reported bug from 2005 which sadly hast not yet been addressed.
Fixing the issue by increasing the MTU
You can't fix this issue by modifying the MTU/MRU settings in '/etc/ppp/options' directly, you have to adjust the MTU after the PPP connection is up and this can be accomplished by adding a custom 'ip-up' script.
Below is my workaround script, place it into file '/etc/ppp/ip-up.d/mppefixmtu' and ensure that it is executable ('chmod +x mppefixmtu'):
#!/bin/sh
CURRENT_MTU="`ifconfig $1 | grep -Po '(?<=MTU:)([0-9]+)'`"
@Kovrinic
Kovrinic / .gitconfig
Last active October 19, 2024 22:03
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "[email protected]:"]
insteadOf = git://github