Skip to content

Instantly share code, notes, and snippets.

View smehringer's full-sized avatar
😎
Getting Work Done

Svenja Mehringer smehringer

😎
Getting Work Done
  • Freie Universitaet Berlin
  • Berlin
View GitHub Profile
@smehringer
smehringer / Version1.md
Last active May 12, 2023 10:10
HIBF_API

Building

    std::vector<std::vector<std::vector<seqan3::dna4>>> seqs{{"AAAGGGGGGC"_dna4}, {"TTTTTT"_dna4}};

    seqan3::hibf_config config
    {
        .input = seqs,
        .kmer_transformation = seqan3::views::kmer_hash(seqan3::ungapped{2u})
 };
@smehringer
smehringer / ex1.cpp
Created June 22, 2022 07:19
I/O API design - Hannes vs. Current
// Standard example
===================
// current implementation:
seqan3::sequence_file_input in{"x.fasta"};
for (auto && rec : in)
seqan3::debug_stream << rec.sequence();
// -------------------------------------------------------------------------------------------------------------------------
import os
from mod_python import apache
# - make sure file in subfolder 'resources/versions.txt' exists
# - URI passed to script is formated like: check/RESOURCENAME
# - RESOURCENAME is formated as either:
# * 'SeqAn_Linux_64_Alf_2.0.0' (Argument Parser in Seqan 2)
# * 'SeqAn3_Linux_64_Raptor_2.0.0' (Argument Parser in Seqan 3)
# * 'SeqAn-Sharg_Linux_64_Alf_2.0.0' (Stand alone Sharg Parser)
# The toolname of a request is extracted and the returned by the server.
@smehringer
smehringer / parser.cpp
Last active March 22, 2022 09:44
Possible argument parser default message solutions
// -----------------------------------------------------------------------------------------------------------------------
// Possible Solutions
// -----------------------------------------------------------------------------------------------------------------------
// Solution 1
// -----------------------------------------------------------------------------------------------------------------------
// We document how people can customize their type and wrap simple types (or maybe we supply those wrappers?)
struct option_wrapper
{
int value{-1};
@smehringer
smehringer / gist:6c48068b0654d1e0bc721b04eb1b77a8
Last active December 2, 2019 12:24
Github PR statistics
# all reviewers
curl -i -H "Accept: application/vnd.github.v3+json" -X GET https://api.github.com/repos/seqan/seqan3/pulls | awk 'BEGIN{REQ="false"}{ if(REQ=="next"){print $0; REQ="false";};if (REQ == "true"){REQ="next";}; if ($0 == " \"requested_reviewers\": [") {REQ="true"}; }' | grep login | cut -d '"' -f 4 | sort | uniq -c
# stats
curl -i -H "Accept: application/vnd.github.v3+json" -X GET "https://api.github.com/repos/seqan/seqan3/pulls?state=closed&per_page=100&page=9" >> /tmp/curl.response
grep -E '^\s\s\s\s\".*_at' /tmp/curl.response | grep -v updated | grep -v closed | grep -v title | cut -d '"' -f 2,4 | awk -F'"' 'BEGIN{ OFS="\t" }{ if ($1=="merged_at"){ print CREATED,$2;}; if ($1=="created_at"){CREATED=$2}; }' > /tmp/curl.response.stats
# in R: