Skip to content

Instantly share code, notes, and snippets.

@jett
jett / data_generator.py
Created October 19, 2023 14:24
OpenTelemetry Span Data Generator
import random
from opentelemetry import trace, propagators
from opentelemetry.sdk.metrics import MeterProvider
from opentelemetry.sdk.metrics._internal.export import ConsoleMetricExporter, PeriodicExportingMetricReader
from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
BatchSpanProcessor,

Keybase proof

I hereby claim:

  • I am jett on github.
  • I am jettgamboa (https://keybase.io/jettgamboa) on keybase.
  • I have a public key ASDUzkifjvEV9zlLvHrmEwp7CexuUQWJE5Z2TKkHQXFUQAo

To claim this, I am signing this object:

var request = require('request');
var hash = require('hash.js');
function sendEmail(to, body, apiKey) {
var formData = {
from: 'job-notice <noreply@mg.hatch.ph>',
to: to,
subject: 'Auth0 Job Listing Updated',
html: body
}
#!/usr/bin/env python
# Go is a 2 player board game with simple rules. Two players alternate turns
# placing stones on a grid. If a stone is surrounded on 4 sides by stones of
# the opponent, it is captured. If a group of stones are surrounded, they are
# captured.
# See http://en.wikipedia.org/wiki/Rules_of_Go#Capture for a visual explanation.
# Below is an implementation of a Go board. Please write some code in the
# move() method to check for captures and output something when a capture
@jett
jett / neo4j
Created February 11, 2016 10:48
import org.neo4j.graphdb.*;
import org.neo4j.graphdb.factory.GraphDatabaseFactory;
import org.neo4j.kernel.GraphDatabaseAPI;
import org.neo4j.server.WrappingNeoServerBootstrapper;
import org.neo4j.server.configuration.Configurator;
import org.neo4j.server.configuration.ServerConfigurator;
import java.io.File;
import java.util.Map;
package ph.hatch.jett;
import java.util.HashMap;
import java.util.Map;
/**
* Created by jett on 10/1/2015.
*/
public class BoyerMoore {
@jett
jett / gist:6876163
Created October 7, 2013 22:35
Convert an XMLString to a Map
private Map convertToMap(String xmlString) {
println "Converting XML string: ${xmlString} to Map..."
Node root = new XmlParser().parseText(xmlString)
Map result = buildMap(root)
println "Converted to: ${result}"
return result