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
namespace contest.submission | |
{ | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using contest.submission.contract; | |
using contest.submission.contract.daten; |
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
var flatten, obj; | |
flatten = require ('./flatten'); | |
obj = { | |
foo: 'bar', | |
bar: 'foo', | |
foobar: { | |
foo: 'foo', | |
bar: 'bar' | |
} |
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
#include "stdafx.h" | |
#include <iostream> | |
using namespace System; | |
using namespace System::Collections::Generic; | |
using namespace System::Diagnostics; | |
using namespace System::Runtime::InteropServices; | |
#pragma unmanaged |
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
// Gremlin user-defined defined tree steps | |
// inTree() and outTree() | |
// by James Thornton, http://jamesthornton.com | |
// added ability to sort subtrees | |
// see https://groups.google.com/d/topic/gremlin-users/iCPUifiU_wk/discussion | |
// closure can't have the same name as the defined step | |
tree = { vertices -> |
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
# | |
# First: Start a new m1.large EC2 instance with Amazon Linux AMI | |
# Next: Copy/Paste all the following code | |
# | |
wget http://www.grouplens.org/sites/www.grouplens.org/external_files/data/ml-10m.zip | |
unzip ml-10m.zip | |
cp ml-10M100K/*.dat /tmp | |
rm -f ml-10m.zip | |
rm -rf ml-10M100K/ |
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
namespace World | |
{ | |
class Life | |
{ | |
static int Main() | |
{ | |
var developer = new Developer(); | |
while (developer.IsAlive) | |
{ |
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
// link two vertices, if the link does not already exists | |
// return the new or the existing link / edge | |
Gremlin.defineStep('link', [Vertex,Pipe], { direction, label, other -> | |
exists = false | |
dirs = direction.toString() | |
dir = dirs.toLowerCase() | |
edge = dir + "E" | |
oppV = direction.opposite().toString().toLowerCase() + "V" | |
link = "link" + dirs.substring(0,1) + dir.substring(1) | |
_()."$dir"(label).filter{it==other}.sideEffect{exists=true}.optional(3).ifThenElse{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
namespace TitanTest | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Sockets; | |
using MsgPack; |
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
namespace TitanTest | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Net.Sockets; | |
using MsgPack; | |
using MsgPack.Serialization; |
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
config = new BaseConfiguration() | |
storage = config.subset("storage") | |
storage.setProperty("backend", "inmemory") | |
index = storage.subset("index").subset("search") | |
index.setProperty("backend", "elasticsearch") | |
index.setProperty("local-mode", true) | |
index.setProperty("client-only", false) | |
index.setProperty("directory", "/tmp/titan/es") |
OlderNewer