This file contains hidden or 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
post <QueryDict: {u'main_photo': [u'false'], u'csrfmiddlewaretoken': [u'hGDTwPxPMeTPC52QazOKEJ8INzKpktDa'], u'desc': [u'a', u'b', u'c', u'a']}> | |
request.FILES | |
<MultiValueDict: {u'file': [<InMemoryUploadedFile: example.owl (application/rdf+xml)>]}> | |
post <QueryDict: {u'main_photo': [u'false'], u'csrfmiddlewaretoken': [u'hGDTwPxPMeTPC52QazOKEJ8INzKpktDa'], u'desc': [u'a', u'b', u'c', u'b']}> | |
request.FILES | |
<MultiValueDict: {u'file': [<InMemoryUploadedFile: eye.pdf (application/pdf)>]}> | |
post <QueryDict: {u'main_photo': [u'false'], u'csrfmiddlewaretoken': [u'hGDTwPxPMeTPC52QazOKEJ8INzKpktDa'], u'desc': [u'a', u'b', u'c', u'c']}> | |
request.FILES | |
<MultiValueDict: {u'file': [<InMemoryUploadedFile: matlabtonumpy.pdf (application/pdf)>]}> |
This file contains hidden or 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
import tika | |
tika.initVM() | |
from tika import parser | |
print parser.from_buffer("<html><body>Hello World</body></html>") | |
print parser.from_file("test.pdf") |
This file contains hidden or 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
@font-face { | |
font-family: Monaco; | |
src: url('https://raw.github.com/goog/goog.github.com/master/MONACO.TTF'); | |
} | |
div.myinter { | |
background:#FFF28F; | |
padding: 0.5em; | |
border: 3px solid #E5EECC; | |
font-family: Monaco, Verdana, Arial, Helvetica, sans-serif; | |
color: #384555; |
This file contains hidden or 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
With git log check which commit is one prior the merge. Then you can reset it using: | |
git reset --hard commit_sha | |
There's also another way | |
git reset --hard HEAD~5 |
This file contains hidden or 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
how to do fuzzy search | |
<jan____> googcheng: a) http://guide.couchdb.org/draft/cookbook.html#key | |
<rnewson> couchdb can't do fuzzy search. |
This file contains hidden or 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
"lists": "{\"likes\": \" function(head,req){ \n\tvar row;\n\tvar likes = req.like.split(\" \"); \n\twhile(row=getRow()) {\n\t keys= row.key.split(\" \"); \n\t for (var i=0;i<likes.length;i++) {\n\t if(keys.indexOf(likes[i]) != -1) \n\t\t{send(row); break;}\n\t\t}\n\t}}\"\n}" | |
{"likes": " function(head,req){ | |
var row; | |
var likes = req.like.split(" "); | |
while(row=getRow()) { | |
keys= row.key.split(" "); | |
for (var i=0;i<likes.length;i++) { | |
if(keys.indexOf(likes[i]) != -1) |
This file contains hidden or 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
Tibet, next year |
This file contains hidden or 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
#labels = ['VA', 'AD', 'NN', 'VV', 'SP', 'CD', 'P', 'IJ', 'JJ', 'CS', 'NR', 'PN'] | |
#label_dict = {}.fromkeys(labels,0) | |
#{'VA': 4937, 'AD': 437, 'NN': 1299, 'SP': 1, 'CD': 13, 'P': 1, 'IJ': 26, | |
#'VV': 1866, 'CS': 1, 'JJ': 255, 'PN': 1, 'NR': 7} | |
整体/NN | |
感觉/VV | |
不/AD | |
是/VC | |
非常/AD | |
结实/VA |
This file contains hidden or 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
Loading default properties from tagger models/chinese-distsim.tagger | |
Reading POS tagger model from models/chinese-distsim.tagger ... done [4.4 sec]. | |
线#NN 不#AD 太#AD 够#AD 长#VA 。#PU | |
某些#DT 地方#NN 不#AD 太#AD 够#VA 长#VA !#PU | |
Tagged 13 words at 236.36 words per second. | |
googcheng@googcheng-OptiPlex-360:~/pos$ ./stanford-postagger.sh models/chinese-nodistsim.tagger test.txt | |
Loading default properties from tagger models/chinese-nodistsim.tagger | |
Reading POS tagger model from models/chinese-nodistsim.tagger ... done [2.0 sec]. | |
线#NN 不#AD 太#AD 够#VA 长#VA 。#PU | |
某些#DT 地方#NN 不#AD 太#AD 够#VA 长#VA !#PU |
This file contains hidden or 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
全面 5 | |
多余 5 | |
廉价 5 | |
怪异 5 | |
最高 5 | |
正规 5 | |
真实 5 | |
短 5 | |
简单 5 | |
贵重 5 |