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
| package hello; | |
| import java.io.IOException; | |
| import javax.servlet.http.*; | |
| import tcloud.se.service.IndexService; | |
| import tcloud.common.stub.RestfulServiceFactory; | |
| import java.util.List; | |
| import java.util.ArrayList; | |
| import tcloud.se.model.*; |
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
| HTTP ERROR 500 | |
| Problem accessing /. Reason: | |
| An unexpected exception occurs : null. | |
| Caused by: | |
| tcloud.common.stub.StubException: An unexpected exception occurs : null. | |
| at tcloud.common.stub.ExceptionMapper.fromResponse(ExceptionMapper.java:39) | |
| at org.apache.cxf.jaxrs.client.ClientProxyImpl.checkResponse(ClientProxyImpl.java:226) |
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
| from nltk.corpus import wordnet as wn | |
| import tesseract | |
| import string | |
| api = tesseract.TessBaseAPI() | |
| api.Init(".","eng",tesseract.OEM_DEFAULT) | |
| api.SetVariable("tessedit_char_whitelist", string.ascii_uppercase) | |
| mBuffer = open('source.jpg','rb').read() | |
| result = tesseract.ProcessPagesBuffer(mBuffer,len(mBuffer),api) | |
| print result |
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
| public class MainClass { | |
| private static final Object o = new Object(); | |
| static { | |
| MyThread thread = new MyThread(); |
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
| require 'formula' | |
| class TmuxForIterm2 < Formula | |
| url 'http://iterm2.googlecode.com/files/tmux-for-iTerm2-20130302.tar.gz' | |
| md5 '9acb1ed1c3f0e24180c6e2e65e512670' | |
| homepage 'http://code.google.com/p/iterm2/wiki/TmuxIntegration' | |
| depends_on 'libevent' | |
| def install |
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
| from operator import attrgetter | |
| # Don't save the symbol tables, use the provided table ascii.syms! | |
| #def SaveFST(t, txtFstFileName, isymFile, osymFile): | |
| def SaveFST(t, txtFstFileName): | |
| #SaveSym(t.isyms, isymFile) | |
| #SaveSym(t.osyms, osymFile) | |
| f = open(txtFstFileName, 'w+'); | |
| states = sorted(t.states, key=attrgetter('initial'), reverse=True) |
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
| PSCRIPT = ../../data/scripts/ | |
| FSYMS = ../../data/pyfst_demo/ascii.syms | |
| FTRAIN_TXT = ../../data/data/nc10k.train.txt | |
| FDEV_TXT = ../../data/data/nc10k.dev.txt | |
| FTRAIN_FST = nc10k.train.fst | |
| FDEV_FST = nc10k.dev.fst | |
| ASYMS = --isymbols=$(FSYMS) --osymbols=$(FSYMS) | |
| AOPT = fstrmepsilon| fstdeterminize |
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
| define([ | |
| 'flight/lib/component', | |
| ], function(defineComponent) { | |
| return defineComponent(function() { | |
| this.screenViewerHitMenu = function (e, data) { | |
| var x = data.position.x; | |
| var y = data.position.y; | |
| var html; | |
| html += '<ul class="dropdown-menu" role="menu">'; |
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
| SENT 0 GOAL DERIVATION: ( [S] ( [PP-LOC] ( [IN] In ) ( [NP] ( [NP] ( [DT] an ) ( [X23] ( [NNP] Oct. ) ( [X24] ( [CD] 19 ) ( [NN] review ) ) ) ) ( [X37] ( [PP] ( [IN] of ) ( [NP] ( [``] `` ) ( [X38] ( [NP-TTL] ( [DT] The ) ( [NN] Misanthrope ) ) ( [X39] ( [''] '' ) ( [PP-LOC] ( [IN] at ) ( [NP] ( [NP] ( [NNP] Chicago ) ( [POS] 's ) ) ( [X34] ( [NNP] Goodman ) ( [NNP] Theatre ) ) ) ) ) ) ) ) ( [PRN] ( [-LRB-] -LRB- ) ( [X42] ( [``] `` ) ( [X43] ( [S-HLN] ( [NP-SBJ] ( [VBN] Revitalized ) ( [NNS] Classics ) ) ( [VP] ( [VBP] Take ) ( [X64] ( [NP] ( [DT] the ) ( [NN] Stage ) ) ( [PP-LOC] ( [IN] in ) ( [NP] ( [NNP] Windy ) ( [NNP] City ) ) ) ) ) ) ( [X44] ( [,] , ) ( [X45] ( [''] '' ) ( [X46] ( [NP-TMP] ( [NN] Leisure ) ( [X21] ( [CC] & ) ( [NNS] Arts ) ) ) ( [-RRB-] -RRB- ) ) ) ) ) ) ) ) ) ) ( [X50] ( [,] , ) ( [X51] ( [NP-SBJ-2] ( [NP] ( [NP] ( [DT] the ) ( [NN] role ) ) ( [PP] ( [IN] of ) ( [NP] ( [NNP] Celimene ) ) ) ) ( [X5] ( [,] , ) ( [X6] ( [VP] ( [VBN] played ) ( [PP-LOC-CLR] ( [IN] by ) ( [NP] ( [NNP] Kim |
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 re | |
| from sys import stdin | |
| def uncnf(g): | |
| return type(g) not in (list, tuple) and g or map(uncnf, g[g[0]=='<DEL>':]) | |
| for line in stdin: | |
| line = re.sub(' +', ',', re.sub('([^() ]+)', r"'\1'", re.sub('([()])', r' \1 ', line).strip())) | |
| line = eval(re.sub(r'\[X[1-9][0-9]*\]', '<DEL>', line.replace('(,', '('))) | |
| print uncnf(line) |
OlderNewer