Skip to content

Instantly share code, notes, and snippets.

Peter M. Elias petermelias

View GitHub Profile
@petermelias
petermelias / uber_walker.py
Last active Dec 26, 2015
The Uber Grapher. This is a demonstration of one way to recursively traverse an arbitrary nested data structure that contains primitive types as well as inter-connected objects. I found that combining the two into a single solution had some subtle "gotchas", so I figured I'd release it just in case. Do keep in mind that the algorithm requires so…
View uber_walker.py
# The MIT License (MIT)
# Copyright (c) 2013 Peter M. Elias
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@petermelias
petermelias / noderdkafka-consumer-state.js
Last active Feb 1, 2018
noderdkafka state test harness
View noderdkafka-consumer-state.js
'use strict';
const kafka = require('node-rdkafka');
const { CODES: { ERRORS: {
ERR__ASSIGN_PARTITIONS,
ERR__REVOKE_PARTITIONS
}}} = kafka;
const clientId = 'pelias-test-client';
const groupId = 'pelias-test-cg';
View HelloEntity.java
import io.micronaut.data.annotation.MappedEntity;
import io.micronaut.data.annotation.Id;
import io.micronaut.data.annotation.GeneratedValue;
@MappedEntity(value = "hellos")
public class HelloEntity {
@Id
@GeneratedValue
private Long id;
You can’t perform that action at this time.