This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"sync/atomic" | |
"unsafe" | |
"sync" | |
"fmt" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/python/env python | |
if __name__ == '__main__': | |
user_items = [] | |
items = [] | |
with open('u.data') as f: | |
for line in f: | |
user_items.append(line.split('\t')) | |
with open('u.item') as f: | |
for line in f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
www.cnblogs.com/LeftNotEasy/* | |
www.binghe.org | |
bubblexc.com | |
datawarehou.se | |
blog.csdn.net/dznlong/* | |
www.ruanyifeng.com | |
www.ibm.com/developerworks/cn/* | |
www.sobuhu.com | |
langyu.iteye.com | |
wupuyuan.iteye.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
author: royguo1988@gmail.com | |
""" | |
import os | |
import random | |
import re | |
class DataPrepare(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-1 -0.303844 -0.458237 | |
-1 -7.727905 -0.384403 | |
-1 -1.693569 -0.724698 | |
1 -6.202481 0.580145 | |
-1 8.869004 -0.343454 | |
1 -5.391438 0.591225 | |
1 7.559267 0.385052 | |
-1 7.263065 -0.239257 | |
-1 -3.519450 -0.989159 | |
-1 -9.948223 -0.421481 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-1 -0.303844 -0.458237 | |
-1 -7.727905 -0.384403 | |
-1 -1.693569 -0.724698 | |
1 -6.202481 0.580145 | |
-1 8.869004 -0.343454 | |
1 -5.391438 0.591225 | |
1 7.559267 0.385052 | |
-1 7.263065 -0.239257 | |
-1 -3.519450 -0.989159 | |
-1 -9.948223 -0.421481 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ldc 将int、float或String型常量值从常量池中推送至栈顶 | |
astore_index 将栈顶数值(objectref)存入当前frame的局部变量数组中指定下标index处的变量中,栈顶数值出栈 | |
getstatic 获取指定类的静态域,并将其值压入栈顶 | |
aload_index 当前frame的局部变量数组中下标为index的引用型局部变量进栈 | |
if_acmpne 比较栈顶两引用型数值,当结果不相等时跳转 | |
iconst_1 int型常量值1进栈 | |
new 创建一个对象,并且其引用进栈 | |
dup 复制栈顶数值,并且复制值进栈 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:utf-8 | |
import os | |
import random | |
import math | |
class KMeans(object): | |
def __init__(self): | |
# 文件名及其包含的单词 {'file_name':{word1:1,word2:1 ...}} | |
self.file_words = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"bufio" | |
"sync" | |
) | |
// Load data into channel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.roy.ds.bloomfilter; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.BitSet; | |
import java.util.List; |
OlderNewer