Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Queue widget example</title>
<style type="text/css">
body {
font-family:Verdana, Geneva, sans-serif;
font-size:13px;
color:#333;
var $db = $.couch.db("test");
$(function() {
$("#uploader").plupload({
// General settings
runtimes : 'flash,html5,browserplus,silverlight,gears,html4',
url : 'http://192.168.0.20:5984/test/test',
max_file_size : '1000mb',
max_file_count: 20, // user can add no more then 20 files at a time
//chunk_size : '1mb',
//unique_names : true,
@goog
goog / memcached
Created May 25, 2012 11:06
memcached
memcached其实也只是transport的一种,之前了解不多,搞错了。。。
@goog
goog / senti_test.txt
Created August 10, 2012 23:46
senti_test.txt
高 好 超出 好 皮实 问题 与众不同 细腻 精巧
----------
轻巧 喜欢 不错 没有 问题 卡 一般 可以
----------
漂亮 精致 好看
----------
好 快 舒服
----------
一流 漂亮
----------
#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
@goog
goog / pagerank
Created September 14, 2012 14:54
from numpy import *
def pagerank(d,v_quadratic_error):
M= array([[0,0,0,0,1],
[0.5,0,0,0,0],
[0.5,0,0,0,0],
[0,1,0.5,0,0],
[0,0,0.5,1,0]])
N=M.shape[1]
post <QueryDict: {u'csrfmiddlewaretoken': [u'2050b2625b7aaa98fa27aa04fa139658'], u'title[]': [u'aa', u'bb']}>
request.FILES
<MultiValueDict: {u'file': [<InMemoryUploadedFile: google_count.pdf (application/pdf)>]}>
post <QueryDict: {u'csrfmiddlewaretoken': [u'2050b2625b7aaa98fa27aa04fa139658'], u'title[]': [u'aa', u'bb']}>
request.FILES
<MultiValueDict: {u'file': [<InMemoryUploadedFile: How to Report Bugs Effectively.pdf (application/pdf)>]}>
[{'url': u'http://127.0.0.1:5984/test/2356c0181de208ecc895245def0019c5/How to Report Bugs Effectively.pdf', 'delete_type': 'DELETE', 'name': u'How to Report Bugs Effectively.pdf', 'delete_url': '/upload/delete/2356c0181de208ecc895245def0019c5'}]
[22/Oct/2012 10:53:59] "POST /upload/ HTTP/1.1" 200 243
[{'url': u'http://127.0.0.1:5984/test/2356c0181de208ecc895245def001950/google_count.pdf', 'delete_type': 'DELETE', 'name': u'google_count.pdf', 'delete_url': '/upload/delete/2356c0181de208ecc895245def001950'}]
[22/Oct/2012 10:53:59] "POST /upload/ HTTP/1.1" 200 207
post <QueryDict: {u'csrfmiddlewaretoken': [u'2050b2625b7aaa98fa27aa04fa139658'], u'title[]': [u'', u'']}>
request.FILES
<MultiValueDict: {u'file': [<TemporaryUploadedFile: Getting Started with RDF and SPARQL Using Sesame and Python _ Jeni's Musings.pdf (application/pdf)>]}>
[{'url': u"http://127.0.0.1:5984/test/2356c0181de208ecc895245def00292a/Getting Started with RDF and SPARQL Using Sesame and Python _ Jeni's Musings.pdf", 'delete_type': 'DELETE', 'name': u"Getting Started with RDF and SPARQL Using Sesame and Python _ Jeni's Musings.pdf", 'delete_url': '/upload/delete/2356c0181de208ecc895245def00292a'}]
[22/Oct/2012 11:07:45] "POST /upload/ HTTP/1.1" 200 335
post <QueryDict: {u'csrfmiddlewaretoken': [u'2050b2625b7aaa98fa27aa04fa139658'], u'title[]': [u'']}>
request.FILES
<MultiValueDict: {u'file': [<InMemoryUploadedFile: google_count.pdf (application/pdf)>]}>
[{'url': u'http://127.0.0.1:5984/test/2356c0181de208ecc895245def003573/google_count.pdf', 'delete_type': 'DELETE', 'name': u'google_count.pdf', 'delet
-----------------------------17014737271115261935351691320 Content-Disposition: form-data; name="title[]" ss -----------------------------17014737271115261935351691320 Content-Disposition: form-data; name="file"; filename="How to Report Bugs Effectively.pdf" Content-Type: application/pdf %PDF-1.4 %áéëÓ 17 0 obj <</Type /Catalog /Pages 1 0 R >> endobj 18 0 obj <</Type /Page /Parent 1 0 R /Resources <</ExtGState <</G0 19 0 R >> /Font <</F0 20 0 R /F1 21 0 R /F2 22 0 R /F3 23 0 R >> /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] >> /MediaBox [0 0 612 792] /Contents 24 0 R >> endobj 24 0 obj <</Filter /FlateDecode /Length 11173 >> stream xœ­}ëŠf;nöÿ}uéñA’m}˜Îï| |’@ $÷YZUÕ¯KOïn¦gª[e[gkɲÜßÚõßßõ·qޖ´·þ_þòííßþç—ßþöKÿþ]§/ûúßvýïß®ßø:Þ®þõ—¿o­ÿ~ý׺þüj~æxûÛ¿ÿò׿¹‰úæ/ò<Ñø­5¾ó5I›×ÿ¯÷¿ëϓ[£}ý}~ü¿Ã6ôç F×8–Ó¿Ÿ?ú³¼ÿ>]Èòç¿}½~þý If¾Ð[4¨¥ {øΦǁJÕçŸÞß1¢ßÞ1"z§ˆþúûõãïûƒênþ½ÿÎ'èc¾›}GNú;'îyÖÇüëc=ý¹½ÿÎÝkÿöÁù¦ú$R黸ò¶š¼ý÷¿üòÿßþó—ÿ2ÿÈ_XÆ6/׬çæŠùñR­K®ÿþß?¾½ÿðßÿö©l —3ßöî:Í¿ÞÿÐô7߸~óbô_¾¶·AÊÑo,ßo³)¯oº
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="robots" content="NONE,NOARCHIVE">
<title>403 Forbidden</title>
<style type="text/css">
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * * { padding:0; }