Skip to content

Instantly share code, notes, and snippets.

Avatar
🤘
working on Thoth and Machine Learning Frameworks and Thoth

Christoph Görn goern

🤘
working on Thoth and Machine Learning Frameworks and Thoth
View GitHub Profile
View gist:c4947ccd6c7cab850ca0588d816bf544
did:3:kjzl6cwe1jw148qx51ud1m1zs1g89ed2e5juw6p6ovajq6do2l72fx54kv7q92k
View merge changes from an template project
git rebase upstream/master
git remote add templates https://github.com/thoth-station/template-project.git
git remote update
git cherry-pick 913759701e45ed9f56d0434f20a76ecfb8a312f8
gh pr create --title "updates from the template project" --body "this is a cherry pick of https://github.com/thoth-station/template-project/commit/913759701e45ed9f56d0434f20a76ecfb8a312f8" --label "bot"
View gist:22b429776eab22bccf718a16340f7f93
kind: BuildLog
apiVersion: buildlog.thoth-station.ninka/v1
metadata:
annotations:
buildlog.thoth-station.ninja/corresponding-build-configuration: {"apiVersion":"build.openshift.io/v1","kind":"BuildConfig","metadata":{"annotations":{"openshift.io/generated-by":"OpenShiftNewApp"},"creationTimestamp":"2018-07-18T14:45:20Z","labels":{"app":"tensorflow-build-image","appName":"tf-fedora27-builder-image-36","appTypes":"tensorflow-build-image"},"name":"tf-fedora27-builder-image-36","namespace":"thoth-prod-tensorflow","resourceVersion":"8850437","selfLink":"/apis/build.openshift.io/v1/namespaces/thoth-prod-tensorflow/buildconfigs/tf-fedora27-builder-image-36","uid":"32107a5d-8a99-11e8-9165-fa163e8c1860"},"spec":{"failedBuildsHistoryLimit":5,"nodeSelector":null,"output":{"to":{"kind":"ImageStreamTag","name":"tf-fedora27-builder-image-36:1"}},"postCommit":{},"resources":{"limits":{"cpu":"6","memory":"8Gi"},"requests":{"cpu":"3","memory":"4Gi"}},"runPolicy":"Serial","source":{"git":{"ref":"master","uri":"http
@goern
goern / gist:c06a82021ba68ac759262ef2a5950bad
Created Jun 27, 2018
regexp for a semver compliant pre-release
View gist:c06a82021ba68ac759262ef2a5950bad
# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9alpha|beta|rc.-]+))?(?:\+([0-9a-zA-Z.-]+))?"
test_str = ("0.0.1\n"
"0.1.0-rc.3\n"
"0.1.0-alpha.12\n"
@goern
goern / gist:170469685532bf39ac7f10db9030fee2
Created Jun 27, 2018
regexp for a semver compliant pre-release
View gist:170469685532bf39ac7f10db9030fee2
# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9alpha|beta|rc.-]+))?(?:\+([0-9a-zA-Z.-]+))?"
test_str = ("0.0.1\n"
"0.1.0-rc.3\n"
"0.1.0-alpha.12\n"
@goern
goern / ec2_group_project.yml
Last active Apr 10, 2018 — forked from carlessanagustin/ec2_group_project.yml
ANSIBLE: Change AWS EC2 Security Group configuration.
View ec2_group_project.yml
#!/usr/local/bin/ansible-playbook -v
---
- hosts: apache0
vars:
rule_list:
- { proto: icmp, type: 3, code: 4, src_cidr_ip: 0.0.0.0/0 }
ec2_group_region: 'us-east-2'
ec2_group_vpc: 'vpc-295720575'
ec2_group_description: 'change for AI Ops Recommendation by Red Hat Insights'
@goern
goern / gist:c511b2fa029574286d77ce09a80a55e8
Created Sep 12, 2017
$PATH - `pipenv run` vs `pipenv shell`
View gist:c511b2fa029574286d77ce09a80a55e8
[goern@tBook p (develop)]$ pipenv run python
Python 3.6.2 (default, Jul 17 2017, 16:44:47)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ["PATH"]
'/Users/goern/.rvm/gems/ruby-2.3.0/bin:/Users/goern/.rvm/gems/ruby-2.3.0@global/bin:/Users/goern/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/usr/local/opt/go/libexec/bin:/Users/goern/.rvm/bin'
>>>
[goern@tBook piler-dev (develop)]$ pipenv shell
Launching subshell in virtual environment. Type 'exit' or 'Ctrl+D' to return.
View gist:7f512e54f03b42b63a08ffa3716c8e53
echo "Starting..."
git clone https://git.example.com/source
make clean
curl -gO https://git.example.com/source/patch-1.diff
patch -p0 < patch-1.diff
rm bogus.c
make all
echo "done!"
@goern
goern / gist:e6aae19a2d8145fa1f184e74f9fe48c9
Created Jul 6, 2017
Hawkular: visualize two deployments
View gist:e6aae19a2d8145fa1f184e74f9fe48c9
1. Hawkular provides CPU, Mem, Net metrics for each Pod
1.1. we can map Pods to deployments, so we can aggregate a deployments resource consumption
2. Tag a point in time when a new deployment started, it ends when a rolling updates is finished.
3. show resource consumption of first deployment, overlayed with resource consumption of second deployment
4. show forcase of resource consumption of first deployment within the overlay diagram
@goern
goern / datanode.yaml
Created May 4, 2017
HADOOP on OpenShift
View datanode.yaml
# A headless service to create DNS records.
apiVersion: v1
kind: Service
metadata:
name: hdfs-datanode
labels:
app: hdfs-datanode
spec:
ports:
- port: 50010