Skip to content

Instantly share code, notes, and snippets.

View davebshow's full-sized avatar

David Michael Brown davebshow

  • Vancouver Island
View GitHub Profile
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
import functools
import pandas as pd
class Transformer:
__mappings__ = {}
@classmethod
Select * from pg_stat_activity where state not ilike 'idle%' and query ilike 'update%';
import collections
import datetime
import logging
from goblin import properties
logger = logging.getLogger(__name__)
CARD_MAPPING = {'Cardinality.single': 'Cardinality.SINGLE',
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]:
//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 {
# 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()
#!/usr/bin/python
foo = []
from .models import Expense
from collections import namedtuple
MyExpense = namedtuple('F', ['type_', 'amount'])
# test data
### REQUEST MESSAGE ###
b'!application/vnd.gremlin-v1.0+json{"args": {"gremlin": "1 + 1"}, "requestId": "043f969b-c1b9-4e7d-a6e5-0fac658b9b3e", "processor": "", "op": "eval"}'
### SERVER RESPONSE ###
{
'requestId': None,
'status': {
'attributes': {
'@class': 'java.util.Collections$EmptyMap'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.