Skip to content

Instantly share code, notes, and snippets.

View chrisseto's full-sized avatar

Chris Seto chrisseto

View GitHub Profile
@chrisseto
chrisseto / README.md
Created December 13, 2023 21:12
Debugging the RSW with `.otlp.jsondn.gz` files

Debugging the RSW with .otlp.jsondn.gz files

This is a short guide on how to work with .otlp.jsondn.gz files that you'll find in the artifacts directory of TeamCity runs after a run of the TestWorkload test.

Tools

  1. DuckDB
  2. Go

Querying the Data

package main
import (
"bytes"
"fmt"
"go/ast"
"go/token"
"go/types"
"sort"
"strings"

Keybase proof

I hereby claim:

  • I am chrisseto on github.
  • I am chrisseto (https://keybase.io/chrisseto) on keybase.
  • I have a public key whose fingerprint is 7F9A 84B7 C4CC 612F 1A90 C8DB 5CA2 72DF 81C1 536D

To claim this, I am signing this object:

Suppose we want to insert the following data into SHARE:

All About Muffins (https://osf.io/juwia/)

This paper is about muffins.

about, muffins

Once all is said and done, the tables in SHARE will look like:

require 'set'
require 'json'
require 'securerandom'
module SHAREClient
class GraphNode
attr_reader :id
@chrisseto
chrisseto / regexRange.js
Last active March 9, 2016 22:04
Given two bounding number generate a regex that matches that range, inclusive.
function regexRange(lo, hi) {
let re = [];
hi = hi.toString();
lo = lo.toString();
while (hi.length > lo.length) {
re.push(hi.split('').reduce((acc, c) => acc + `[${acc.length === 0 ? 1 : 0}-${c}]`, ''));
hi = '9'.repeat(hi.length - 1);
}
let i = 0;
re.push(lo.split('').reduce((acc, c) => acc + `[${c}-${hi[i++]||c}]`, ''));
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery Experimenter Interface</title>
</head>
<body>
<select id="exp"></select>
<select id="session"></select>
@chrisseto
chrisseto / application.controller.js
Last active February 29, 2016 19:39
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
myComponent: 'will-destroy-element',
appName: 'Ember Twiddle',
actions: {
click() {
if (this.get('myComponent') !== null)
this.set('myComponent', null);
else
from IPython.core.magic import Magics, magics_class, line_magic
import asyncio
@magics_class
class AsyncMagics(Magics):
@line_magic
def await(self, line):
return asyncio.get_event_loop().run_until_complete(eval(line, self.shell.user_global_ns, self.shell.user_ns))
{
"metadata": {
"name": "",
"signature": "sha256:5414b12e5613456d6b81de472be9f5d902c5ef090fa39aad4abc1864f95ad48c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [