Skip to content

Instantly share code, notes, and snippets.

@kamidzi
kamidzi / scenario-modeling-patch-docs.html
Last active May 19, 2026 20:27
ReDoc preview: scenario-modeling spec with PATCH /scenarios/{scenario_id} (DAT-326)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8" />
<title>BBE Scenario Modeling API Proposal</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
@kamidzi
kamidzi / scenario-modeling-docs.html
Last active May 18, 2026 21:02
DAT-320: Scenario Modeling Summary API spec preview (ReDoc)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8" />
<title>BBE Scenario Modeling API Proposal</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
@kamidzi
kamidzi / first_sample.bcftools.stats.txt
Created April 15, 2024 03:46
AllofUs test bcftools stats
~/workspaces_playground/duplicateofdeliriumtremensresearch/dataset_78200286_vcfs$ bcftools stats dataset_78200286_merged.first_half.vcf.gz
# This file was produced by bcftools stats (1.12+htslib-1.12) and can be plotted using plot-vcfstats.
# The command line was: bcftools stats dataset_78200286_merged.first_half.vcf.gz
#
# Definition of sets:
# ID [2]id [3]tab-separated file names
ID 0 dataset_78200286_merged.first_half.vcf.gz
# SN, Summary numbers:
# number of records .. number of data rows in the VCF
# number of no-ALTs .. reference-only sites, ALT is either "." or identical to REF
@kamidzi
kamidzi / nova_client_versions.py
Created October 4, 2018 15:13
Use string literals for novaclient api versions
from novaclient.client import Client as NovaClient
from ka_auth import get_session
from decimal import Decimal
str_versions = ['2', '2.1', '2.10', '2.26', '2.59', '2.60']
if __name__ == '__main__':
novaclient = __import__('novaclient')
attrs = ('API_MAX_VERSION', 'API_MIN_VERSION', '__version__')
for a in attrs:
@kamidzi
kamidzi / nova_test.py
Created April 28, 2017 20:38
Nova client test - DOB1
#!/usr/bin/env python
from novaclient import client
import os
import sys
VERSION = 2
params = [
('api_version', 2,),
('username', os.environ.get('OS_USERNAME'),),
('password', os.environ.get('OS_PASSWORD'),),
@kamidzi
kamidzi / pr1054.sh
Created June 20, 2016 21:08
Exercise pr1054 ?
#!/bin/bash
set -eu
d=$(git rev-parse --show-toplevel)
cd $d/bootstrap/vagrant_scripts || exit 1
if [[ ! -r Vagrantfile ]] ; then exit 2 ; fi
# create the aggregate
vagrant ssh vm1 -c 'bash <<EoF
@kamidzi
kamidzi / install_kdc.sh
Created April 27, 2016 21:11
krb5 mess about
#!/bin/bash
hash -r
set -eu
# bias towards heimdal
#sudo apt-get install -y heimdal-kdc
sudo apt-get install -y krb5-kdc krb5-admin-server
# For apache
sudo apt-get install libapache2-mod-auth-kerb
@kamidzi
kamidzi / gist:5d12750b19d57c2ea2c9
Created January 13, 2016 19:28
package test unpinning
packages=(
ceph
ceph-common
ceph-fs-common
ceph-fuse
ceph-mds
elasticsearch
erlang-asn1
erlang-base
erlang-corba
# Before
root@bcpc-vm1:~# lsof -itcp@192.168.100.11 -stcp:listen -n -P | sort -k9 -r -u
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 264336 root 6u IPv4 605279 0t0 TCP 192.168.100.11:80 (LISTEN)
apache2 264336 root 7u IPv4 605281 0t0 TCP 192.168.100.11:443 (LISTEN)
root@bcpc-vm1:~# curl -k -I https://192.168.100.{5,11}:443 http://192.168.100.{5,11}
HTTP/1.1 200 OK
x-amz-request-id: tx000000000000000000763-00567c0e3b-1131-default
Content-type: application/xml
Content-Length: 0