Skip to content

Instantly share code, notes, and snippets.

Gran Sasso --- INFN Laboratori Nazionali del Gran Sasso, LNGS, Assergi, Italy
INFN, Milan --- Dipartimento di Fisica - Università degli Studi e INFN - Milano 20133 - Italy
Okayama U. --- Department of Physics, Okayama University, Okayama 700-8530, Japan
Virginia Tech. --- Virginia Tech.
IPCMS, Strasbourg --- Institut de Physique et Chimie des Matériaux de Strasbourg - 23 rue du Loess - F-67037 - Strasbourg - France
Dresden, Tech. U. --- Technische Universität Dresden, 01062, Dresden, Germany
Irkutsk State U. --- Irkutsk State University, Irkutsk 664003, Russia
Beijing, Inst. High Energy Phys. --- Institute of High Energy Physics - CAS - Beijing 100049 - China
CERN --- CERN, Geneva, Switzerland
Hiroshima U. --- Graduate School of Advanced Science of Matter - Hiroshima U. - Kagamiyama - Higashi-Hiroshima - 739-8530 - Hiroshima - Japan
@kaplun
kaplun / es_cli.py
Created April 11, 2017 21:56 — forked from david-caro/es_cli.py
Small ES cli tool to remap an index
#!/usr/bin/env python
# encoding: utf-8
import json
import re
import time
import logging
import click
from elasticsearch import Elasticsearch
from elasticsearch.helpers import reindex
@kaplun
kaplun / gist:aa79777e0f5d371383cbadaf33631893
Last active June 22, 2017 15:24
Duplicate INSPIRE IDs
+----------+------------------------------------------------------------------------+---+
| personid | GROUP_CONCAT(distinct data SEPARATOR ', ') | c |
+----------+------------------------------------------------------------------------+---+
| 224828 | INSPIRE-00509411, INSPIRE-00052076 | 2 |
| 246425 | INSPIRE-00281360, INSPIRE-00132187 | 2 |
| 249861 | INSPIRE-00454826, INSPIRE-00625964, INSPIRE-00330298, INSPIRE-00219535 | 4 |
| 251044 | INSPIRE-00645673, INSPIRE-None | 2 |
| 251960 | INSPIRE-00278790, INSPIRE-00102470 | 2 |
| 254681 | INSPIRE-00449933, INSPIRE-00295984 | 2 |
| 259219 | INSPIRE-00506284, INSPIRE-0041107 | 2 |
for elem in a:
recid = elem[0]
cdsid = elem[3]
out.setdefault(cdsid, recid)
if out[cdsid] != recid:
print "http://inspirehep.net/record/%s" % out[cdsid], "http://inspirehep.net/record/%s" % recid, "https://inspirehep.net/record/merge/#recid1=%s&recid2=%s" % (out[cdsid], recid)
@kaplun
kaplun / ansible.cfg
Created February 1, 2018 15:16 — forked from towo/ansible.cfg
GPG wrapping Ansible Vault
[defaults]
hostfile = some-environment
vault_password_file = bin/gpg-wrapper.sh
<?xml version="1.0"?>
<clientConfig version="1.1">
<emailProvider id="protonmail.com">
<domain>protonmail.com</domain>
<domain>protonmail.ch</domain>
<domain>pm.me</domain>
<displayName>ProtonMail</displayName>
<displayShortName>ProtonMail</displayShortName>

Keybase proof

I hereby claim:

  • I am kaplun on github.
  • I am kaplun (https://keybase.io/kaplun) on keybase.
  • I have a public key ASAzU9ooocxq9Vjh82OD2GpqxAirlDTugZqaRFkMF1Su4wo

To claim this, I am signing this object: