Skip to content

Instantly share code, notes, and snippets.

@sergeyenin
sergeyenin / pii_quality_consolidated_20260327_192019.log
Created March 27, 2026 21:14
PII Enrichment Experiment gpt-4o
=== PII enrichment quality test — run start 2026-03-27T19:20:19Z ===
NUM_PROMPTS=100
MODEL=gpt-4o
TALON_DATA_DIR=/tmp/tmp.s38gKp4gtf
SCRIPT_DIR=/home/openclaw/talon/tests
HAS_YQ=0 python3=/usr/bin/python3 jq=/usr/bin/jq
OPENAI_API_KEY=(set, 164 chars)
TALON_SECRETS_KEY=(set, 64 chars)
Failure log: /home/openclaw/talon/tests/pii_quality_failures_20260327_192019.log
=== end header ===
@sergeyenin
sergeyenin / pii_quality_consolidated_20260327_190253.log
Created March 27, 2026 21:13
PII Enrichment Experiment gpt-4o-mini
=== PII enrichment quality test — run start 2026-03-27T19:02:53Z ===
NUM_PROMPTS=100
MODEL=gpt-4o-mini
TALON_DATA_DIR=/tmp/tmp.gJRMt1ojVm
SCRIPT_DIR=/home/openclaw/talon/tests
HAS_YQ=0 python3=/usr/bin/python3 jq=/usr/bin/jq
OPENAI_API_KEY=(set, 164 chars)
TALON_SECRETS_KEY=(set, 64 chars)
Failure log: /home/openclaw/talon/tests/pii_quality_failures_20260327_190253.log
=== end header ===
@sergeyenin
sergeyenin / hug_swagger.py
Created May 23, 2018 14:32 — forked from nonamenix/hug_swagger.py
Swagger specification for hug. Ugly draft.
import inspect
import collections
from collections import OrderedDict
import hug
import logging
from apispec import APISpec
from apispec.ext.marshmallow.swagger import field2parameter
from copy import copy
@sergeyenin
sergeyenin / letsencrypt_2017.md
Created December 12, 2017 18:57 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

require ENV_PATH
class String
# http://www.devarticles.com/c/a/Development-Cycles/Tame-the-Beast-by-Matching-Similar-Strings/3/
module Soundex
Codes = {
'b' => 1,
'f' => 1,
'p' => 1,
'v' => 1,
@sergeyenin
sergeyenin / cassandra_1_mln_inserting.rb
Created July 18, 2012 15:33
CassandraModelCql inserting 1 mln rows and counting it
# encoding: utf-8
$:.unshift File.expand_path("../../lib/",__FILE__)
require 'rubygems'
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
@sergeyenin
sergeyenin / user_system_real.md
Created February 8, 2012 18:56 — forked from anildigital/user_system_real.md
Ruby Benchmark module: meanings of “user”, “system”, and “real”?

Ruby Benchmark module: meanings of “user”, “system”, and “real”?

>> Benchmark.bm(7) { |b| b.report('Report:') { s = '' ; 10000.times { s += 'a' } }  }
			 user     system      total        real
Report:  0.150000   0.010000   0.160000 (  0.156361)

These are the same times that the Unix time command or other typical benchmarking tools would report:

user: the amount of time spent executing userspace code (i.e.: your code),

@sergeyenin
sergeyenin / Gemfile
Created February 6, 2012 13:14 — forked from rwjblue/Gemfile
Simple CQL to Thrift Comparison in ruby
source :rubygems
gem 'rake'
gem 'forgery'
gem 'cassandra-cql', :path => '../cassandra-cql'
gem 'cassandra', :path => '../cassandra'
gem 'perftools.rb'
gem 'rbtrace'
@sergeyenin
sergeyenin / 01. Gemfile
Created January 3, 2012 15:28 — forked from schleg/01. Gemfile
Setup for Devise + Omniauth
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'