This file contains hidden or 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 logging | |
import boto3 | |
from healx.batching import batched | |
from healx.iterables import flatten | |
logging.basicConfig(level=logging.INFO) | |
logger = logging.getLogger(__file__) | |
client = boto3.client('s3') | |
This file contains hidden or 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
// count all node labels | |
MATCH (n) | |
RETURN labels(n), count(DISTINCT n); | |
// describe metagraph | |
CALL db.schema(); | |
// list node stats | |
// Sample some nodes, reporting on property and relationship counts per node. | |
MATCH (n) WHERE rand() <= 0.1 |
This file contains hidden or 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 unittest | |
from hamcrest import assert_that, calling, raises | |
import pytest | |
def call_exit(): | |
sys.exit() |
This file contains hidden or 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 multiprocessing import Pool | |
from multiprocessing.pool import ApplyResult | |
def call_it(instance, name, args=(), kwargs=None): | |
if kwargs is None: | |
kwargs = {} | |
return getattr(instance, name)(*args, **kwargs) | |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am danodonovan on github. | |
* I am danodonovan (https://keybase.io/danodonovan) on keybase. | |
* I have a public key whose fingerprint is 910D 91FB 2702 4C4C 4330 0268 B631 1E01 140A B905 | |
To claim this, I am signing this object: |
This file contains hidden or 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 bisect | |
class NFA(object): | |
EPSILON = object() | |
ANY = object() | |
def __init__(self, start_state): | |
self.transitions = {} | |
self.final_states = set() | |
self._start_state = start_state |