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
import sys | |
import requests | |
from arango import create | |
from bs4 import BeautifulSoup | |
HEADERS = { | |
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5)", |
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 py2neo import neo4j, node | |
graph_db = neo4j.GraphDatabaseService( | |
"http://localhost:7474/db/data/") | |
alice, bob, carol = node(name="Alice"), \ | |
node(name="Bob"), \ | |
node(name="Carol") | |
abc = neo4j.Path( | |
alice, "KNOWS", bob, "KNOWS", carol) |
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 arango import create | |
from arango.aql import F, V | |
def dataset(): | |
""" | |
Basic dataset | |
""" | |
a.database.create() | |
a.users.create() |
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
// service to display *bootstrap modal* popups | |
// - `display` method return **promise** which | |
// contain `resolve` or `cancel` handlers (eq buttons) | |
common.service('confirmService', ["$q", function($q) { | |
var that = this; | |
var deferred = null; | |
// default state for the modal | |
this.state = { | |
message: null, |
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
FILES := $(shell find . | grep '\.coffee$$') | |
TARGETS := $(patsubst %.coffee, %.js, $(FILES)) | |
cleanup: | |
@echo $(FILES) to cleanup | |
@echo perl -i.bak -ne 'print if /\S/' $(FILES) | |
build: $(TARGETS) | |
%.js: %.coffee |
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
(function (g) { | |
var VERSION = "0.1.1"; | |
var PREFIX = "___scope_cleaner__"; | |
// check is some variable is array or not | |
var isArray = function (obj) { | |
return obj.constructor === Array; | |
}; | |
// wrapper on Array.indexOf for old browser |
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 arango import create | |
from arango.clients.urllib2client import Urllib2Client | |
# create connection to database | |
voca = create(client=Urllib2Client) | |
# ... |
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
#!/usr/bin/env python | |
import argparse | |
import json | |
import sys | |
import StringIO | |
import couchdb | |
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 n = 1000, cn = "testdocs_js"; | |
db._drop(cn); db._create(cn); var c = db._collection(cn); | |
var t = new Date(); for (var i = 0; i < n; ++i) { c.save({ "value" : "test_" + i }); }; var e = new Date(); | |
e.getMilliseconds() - t.getMilliseconds(); |
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
import sys | |
import time | |
from datetime import datetime | |
from arango import create | |
from arango.document import Document | |
from arango.clients import Client | |
try: |