Skip to content

Instantly share code, notes, and snippets.

View davebshow's full-sized avatar

David Michael Brown davebshow

  • Vancouver Island
View GitHub Profile
#!/usr/bin/python
foo = []
from .models import Expense
from collections import namedtuple
MyExpense = namedtuple('F', ['type_', 'amount'])
# test data
# This is the current API
class SocialTraversalDsl(GraphTraversal):
def knows(self, person_name):
return self.out("knows").hasLabel("person").has("name", person_name)
def youngestFriendsAge(self):
return self.out("knows").hasLabel("person").values("age").min()
//http://bionicteaching.com/google-script-drop-boxdisplay-package/
// This script was written by Michael Price/Doug Saunders
function doGet(e) {
return HtmlService.createHtmlOutputFromFile('form.html');
}
function uploadFiles(form) {
try {
In [2]: from gremlin_python.process.graph_traversal import GraphTraversalSource
In [3]: from gremlin_python import statics
In [4]: d = {}
In [5]: statics.load_statics(d)
In [6]: d
Out[6]:
import collections
import datetime
import logging
from goblin import properties
logger = logging.getLogger(__name__)
CARD_MAPPING = {'Cardinality.single': 'Cardinality.SINGLE',
Select * from pg_stat_activity where state not ilike 'idle%' and query ilike 'update%';
import functools
import pandas as pd
class Transformer:
__mappings__ = {}
@classmethod
sepalLength sepalWidth petalLength petalWidth species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa