Skip to content

Instantly share code, notes, and snippets.

View goern's full-sized avatar
🥥
working on getting Data Science done...

Christoph Görn goern

🥥
working on getting Data Science done...
View GitHub Profile
@goern
goern / proof.md
Last active February 6, 2024 09:14

openpgp4fpr:8a07d816280a983bbc35e85c280db66a3e8c012e

@goern
goern / datanode.yaml
Created May 4, 2017 12:44
HADOOP on OpenShift
# A headless service to create DNS records.
apiVersion: v1
kind: Service
metadata:
name: hdfs-datanode
labels:
app: hdfs-datanode
spec:
ports:
- port: 50010
did:3:kjzl6cwe1jw148qx51ud1m1zs1g89ed2e5juw6p6ovajq6do2l72fx54kv7q92k
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"
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 June 27, 2018 08:25
regexp for a semver compliant pre-release
# 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 June 27, 2018 08:25
regexp for a semver compliant pre-release
# 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 April 10, 2018 15:25 — forked from carlessanagustin/ec2_group_project.yml
ANSIBLE: Change AWS EC2 Security Group configuration.
#!/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:d21e5f9bee733a4f30c7
Last active October 31, 2017 08:52
Atomic Host demo on Google Compute Engine (GCE)

Overview

Basically four steps:

  1. install SDK and initialize a new project via console
  2. upload and generate a new GCE image for your project
  3. instantiate a new instance on GCE using the image
  4. follow a known path

install SDK and initialize a new project via console

  • Sign up for Google Compute Engine
@goern
goern / gist:c511b2fa029574286d77ce09a80a55e8
Created September 12, 2017 18:09
$PATH - `pipenv run` vs `pipenv shell`
[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.