Skip to content

Instantly share code, notes, and snippets.

Martin Czygan miku

Block or report user

Report or block miku

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@miku
miku / .gitignore
Last active Mar 5, 2020
Like zcat but reads one or more files from stdin (e.g. from find)
View make_datacite_ingest_requests.py
"""
Take a CSV from:
psql fatcat_prod -c "COPY (select id, doi, release_stage, work_ident_id from release_rev where extra_json->>'datacite' is not null) TO '/tmp/datacite-throwaway.csv' WITH CSV DELIMITER ',';"
and generate ingest requests, one per line.
"""
from __future__ import print_function
@miku
miku / download_github_organization_stats.py
Created Jan 5, 2020 — forked from s-m-e/download_github_organization_stats.py
Download basic statistics for all repositories in list of GitHub organizations
View download_github_organization_stats.py
#!/usr/bin/env python
# Python 3
import datetime
import json
import os
from github import Github # pip install PyGithub
ORGANIZATIONS = ['my_organization', 'some_other_organization']
@miku
miku / datacite.json
Last active Dec 16, 2019
Example datacite record.
View datacite.json
{
"id": "10.7916/d8-f93n-rk51",
"type": "dois",
"attributes": {
"doi": "10.7916/d8-f93n-rk51",
"identifiers": [
{
"identifier": "https://doi.org/10.7916/d8-f93n-rk51",
"identifierType": "DOI"
}
@miku
miku / cursor400.sh
Last active Dec 4, 2019
Trying to reproduce a HTTP 400 on datacite api v2 using cursor.
View cursor400.sh
#!/bin/bash
# To reproduce, run script and wait a bit, until it stop; last line should be a
# (22) from curl.
#
# $ bash cursor400.sh
# ...
# curl: (22) The requested URL returned error: 400
set -eu -o pipefail
@miku
miku / .gitignore
Last active Nov 4, 2019
ISIL offline
View Arch linux minikube kvm2 setup
# Install these packages (use your favorite AUR tool here)
yay -S minikube-bin kubectl-bin docker-machine-driver-kvm2 libvirt qemu-headless docker-machine ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/
sudo virsh net-autostart default
@miku
miku / wheeler.md
Created Aug 20, 2019 — forked from kimsk/wheeler.md
THE USE OF SUB-ROUTINES IN PROGRAMMES
View wheeler.md

THE USE OF SUB-ROUTINES IN PROGRAMMES

D. J. Wheeler

Cambridge & Illinois Universities

A sub-routine may perhaps best be described as a self-contained part of a programme, which is capable of being used in different programmes. It is an entity of its own within a programme. There is no necessity to compose a programme of a set of distinct sub-routines; for the programme can be written as a complete unit, with no divisions into smaller parts. However it is usually advantageous to arrange that a programme is comprised of a set of subroutines, some of which have been made specially for the particular programme while others are available from a library of standard sub-routines. The reasons for this will be discussed below.

When a programme has been made from a set of sub-routines the breakdown of the code is more complete than it would otherwise be. This allows the coder to concentrate on one section of a programme at a time without the overall detai

View fatcat39.tsv
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
OK 1530-1311 Temporal Representation and Reasoning https://portal.issn.org/resource/ISSN/2332-6468
OK 1641-6554 Kolposkopia
NA Computers in Cardiology Conference
OK 1089-7771 IEEE transactions on information technology in biomedicine. https://portal.issn.org/resource/ISSN/1089-7771
OK 1093-1139 Academic physician and scientist https://portal.issn.org/resource/ISSN/1093-1139
OK 1088-7725 AUTOTESTCON https://portal.issn.org/resource/ISSN/1088-7725
OK 1527-4160 Journal of psychiatric practice https://portal.issn.org/resource/ISSN/1538-1145
@miku
miku / README.md
Created Mar 4, 2019 — forked from mikecharles/README.md
Deploy a Python application using Ansible and the Ansistrano role
View README.md

To deploy your app, you'll need to install Ansible and the Ansistrano deploy and rollback Ansible Galaxy roles.

Then create a directory in your app (eg. named ansible) and put these files in there. You should only need to modify the top few variables in vars.yml to get the deployment working for your app.

To do the deployment, use a command like this:

ansible-playbook --limit <host-name> ansible/deploy.yml
You can’t perform that action at this time.