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
(deftest defspout [] | |
(is ((streamit/filter test-spout [] [[] -> [:double]] | |
(init [max 1000]) | |
(work {:push 1} | |
(let [rand-double (* max (rand))] | |
(Thread/sleep 10) | |
(streamit/push [rand-double])))))) |
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
(defmacro filter [name params type & body] | |
(let [prepare-fn-name (symbol (str name "__prep")) | |
[input-spec _arrow_ output-spec] type | |
[init work] body | |
[i init-defs] init | |
[w conf & impl-body] work | |
fn-body (if (empty? input-spec) | |
(if (empty? init-defs) | |
`(fn [] (spout (~'nextTuple [] ~@impl-body))) | |
`(fn [] (let [~@init-defs] (spout (~'nextTuple [] ~@impl-body))))) |
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
[svn-remote "svn"] | |
url = svn+ssh://mpathira@bitternut.cs.indiana.edu/home/dquob/svn-repo/slosh/cloudpipe/trunk | |
fetch = :refs/remotes/git-svn |
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
/** | |
* Validate the provided whirr configuration, copy the configuration(including byon node file) to scratch working | |
* directory and returns the file path to the whirr configuration. | |
* @param appDeploymentDesc GFac application deployment description | |
* @return Whirr configuration file path | |
*/ | |
private String getWhirrConfigurationFile(HadoopApplicationDeploymentDescriptionType appDeploymentDesc) throws ProviderException, IOException { | |
if(appDeploymentDesc.getWhirrConfigurationFile() != null){ | |
File whirrConfig = new File(appDeploymentDesc.getWhirrConfigurationFile()); | |
if(!whirrConfig.exists()){ |
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
scrapy crawl scrapy |
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
from scrapy.spider import BaseSpider | |
from scrapy.selector import HtmlXPathSelector | |
from scrapy.http.request import Request | |
from scrapy_sample.items import ScrapySampleItem | |
class ScrapyOrgSpider(BaseSpider): | |
name = "scrapy" | |
allowed_domains = ["scrapy.org"] | |
start_urls = ["http://blog.scrapy.org/"] |
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
from scrapy.item import Item, Field | |
class ScrapySampleItem(Item): | |
title = Field() | |
link = Field() | |
content = Field() |
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
scrapy startproject scrapy_sample |
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
<xs:element name="subtract"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element minOccurs="0" name="a" type="xs:int"/> | |
<xs:element minOccurs="0" name="b" type="xs:int"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> |
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
<bpel:copy> | |
<bpel:from> | |
<bpel:literal xml:space="preserve"> | |
<ns:subtract xmlns:ns="http://cts.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></ns:subtract> | |
</bpel:literal> | |
</bpel:from> | |
<bpel:to variable="SubtractPLRequest" part="parameters"></bpel:to> | |
</bpel:copy> |