Skip to content

Instantly share code, notes, and snippets.

View aufi's full-sized avatar

Marek Aufart aufi

View GitHub Profile

huggingface / transformers pipeline - what to do model

Local install

python -m venv ml-env
source ./ml-env/bin/activate
pip install torch # use PyTorch or TF
@aufi
aufi / index.html
Created May 11, 2023 13:42
Windup report for PathfinderGit sample app (windup/report/index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>Application List</title>
<link href="reports/resources/css/bootstrap.min.css" rel="stylesheet"/>
@aufi
aufi / main.go
Last active September 6, 2022 15:59
gin tar gz on the fly sample
package main
import (
"archive/tar"
"bufio"
"bytes"
"compress/gzip"
"fmt"
"io"
"log"
@aufi
aufi / shell
Last active May 27, 2022 11:36
Keycloak userInfo test queries
$ export TOKEN="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSl..."
$ curl -v -H "Authorization: Bearer $TOKEN" 'https://tackle-konveyor-tackle.apps.cluster-mauf.local/auth/realms/tackle/protocol/openid-connect/userinfo'
{"sub":"7749cf8a-bb8a-43c7-a689-80c90e6023eb","email_verified":false,"preferred_username":"admin"}
@aufi
aufi / sample_import.csv
Created May 12, 2022 08:25
Sample Tackle 2 application import (2 apps, 1 dep)
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 53 columns, instead of 4 in line 3.
Record Type 1,Application Name,Description,Comments,Business Service,Binary Group,Binary Artifact,Binary Version,Binary Packaging,Repository Type,Repository URL,Repository Branch,Repository Path,Tag Type 1,Tag 1,Tag Type 2,Tag 2,Tag Type 3,Tag 3,Tag Type 4,Tag 4,Tag Type 5,Tag 5,Tag Type 6,Tag 6,Tag Type 7,Tag 7,Tag Type 8,Tag 8,Tag Type 9,Tag 9,Tag Type 10,Tag 10,Tag Type 11,Tag 11,Tag Type 12,Tag 12,Tag Type 13,Tag 13,Tag Type 14,Tag 14,Tag Type 15,Tag 15,Tag Type 16,Tag 16,Tag Type 17,Tag 17,Tag Type 18,Tag 18,Tag Type 19,Tag 19,Tag Type 20,Tag 20
1,MarketingApp,My cool app for Marketing dept,Comment from me,Marketing,binarygrp,elfbin,v1,rpm,git,,main,/repo,Language,Java,Webserver,Tomcat,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1,BackendApp,A backend app for Marketing,,Marketing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2,MarketingApp,BackendApp,NORTHBOUND
@aufi
aufi / plan-migraton-status-vm-pipeline.json
Created February 4, 2022 13:19
oc get plan plan1 | jq -r ".items[0] .status.migration.vms[0].pipeline"
[
{
"completed": "2022-01-19T12:34:34Z",
"description": "Initialize migration.",
"name": "Initialize",
"progress": {
"completed": 1,
"total": 1
},
"started": "2022-01-19T12:33:45Z"
@aufi
aufi / tree_full.txt
Created May 3, 2021 07:45
targeted must gather compare
must-gather-full/
├── cluster-scoped-resources
│   ├── cdiconfigs.cdi.kubevirt.io
│   │   └── config.yaml
│   ├── cdis.cdi.kubevirt.io
│   │   └── cdi-kubevirt-hyperconverged.yaml
│   ├── networkaddonsconfigs.networkaddonsoperator.network.kubevirt.io
│   │   └── cluster.yaml
│   └── vmimportconfigs.v2v.kubevirt.io
│   └── vmimport-kubevirt-hyperconverged.yaml
@aufi
aufi / Makefile
Last active February 8, 2021 07:32
RH Learning day - IoT ESP32 ultrasonic radar
DEV ?= /dev/ttyUSB0
setup:
sudo dnf install -y wget esptool micropython picocom ampy
wget https://micropython.org/resources/firmware/esp32-idf4-20210202-v1.14.bin
flash:
esptool --port ${DEV} erase_flash
esptool --chip esp32 --port ${DEV} --baud 115200 write_flash -z 0x1000 esp32-idf4-20210202-v1.14.bin
@aufi
aufi / mig-rollback-samples.yaml
Created November 11, 2020 09:39
OpenShift YAML test objects for unquiesce tests
---
{"level":"info","ts":1602572585.2463334,"logger":"migration|wmwx6","msg":"[RUN]","migration":"mig-run","stage":false,"phase":""}
{"level":"info","ts":1602572585.6477191,"logger":"migration|5qts5","msg":"[RUN]","migration":"mig-run","stage":false,"phase":"Started"}
{"level":"info","ts":1602572586.0637507,"logger":"migration|fd9cq","msg":"[RUN]","migration":"mig-run","stage":false,"phase":"Prepare"}
{"level":"info","ts":1602572586.9295113,"logger":"migration|zj2h8","msg":"[RUN]","migration":"mig-run","stage":false,"phase":"EnsureCloudSecretPropagated"}
{"level":"info","ts":1602572588.5258539,"logger":"migration|qjgzk","msg":"[RUN]","migration":"mig-run","stage":false,"phase":"PreBackupHooks"}
{"level":"info","ts":1602572588.811703,"logger":"migration|jckbm","msg":"[RUN]","migration":"mig-run","stage":false,"phase":"EnsureInitialBackup"}
{"level":"info","ts":1602572589.518848,"logger":"migration|t86h9","msg":"[RUN]","migration":"mig-run","stage":false,"phase":"InitialBackupCreated"}