Skip to content

Instantly share code, notes, and snippets.

@sroecker
sroecker / debug_pytorch_rocm.py
Last active March 8, 2024 16:08
If this is not crashing then PyTorch is most likely running with your AMD graphics card and ROCm, if not see magic variables
import torch
print("pytorch version: " + torch.__version__)
print("CUDA available: " + str(torch.cuda.is_available()))
print("device count: " + str(torch.cuda.device_count()))
print("current device: " + str(torch.cuda.current_device()))
print("device name: " + torch.cuda.get_device_name(torch.cuda.current_device()))
print("backend:")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(device)

Continuous Integration & Delivery (CI/CD) Unconference

Tuesday, February 5th, Berner Fachhochschule

We are happy to announce an unconference about the topic of Continuous Integration & Delivery (CI/CD). The event is organized by Swiss Alliance for Data-Intensive Services members Zazuko and Berner Fachhochschule. It will take place on Tuesday afternoon, February 5th 2019. We will start at 13:30 and stop latest at 18:00

What is an unconference?

An Unconference is an event where there is no fix schedule defined upfront, the event will be completely participant-driven. The final agenda is created collaboratively by the attendees at the beginning of the unconference. Anyone who wants to initiate a discussion on a topic can claim a time and a space. Some unconference sessions are led by the participant who suggested its topic; other unconference sessions (for example Open Space meetings) are basically open

@jpkrohling
jpkrohling / rhsso-on-openshift.sh
Created July 14, 2017 09:36
Red Hat SSO on OpenShift
SECRETS_KEYSTORE_PASSWORD=$(openssl rand -base64 512 | tr -dc A-Z-a-z-0-9 | head -c 17)
oc cluster up --version=latest
oc login -u system:admin
oc new-project redhat-sso
oc create serviceaccount sso-service-account
oc policy add-role-to-user view system:serviceaccount:redhat-sso:sso-service-account
oc create -n openshift -f https://raw.githubusercontent.com/jboss-openshift/application-templates/ose-v1.3.7/jboss-image-streams.json
for template in sso71-https.json \
sso71-mysql-persistent.json \
@portante
portante / check_es_state.sh
Last active September 14, 2017 03:11
A simple script to check the state of Elasticsearch from within an ES pod in an OpenShift cluster
#!/bin/bash
ES_URL='https://localhost:9200'
curl_get='curl -s -X GET --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key'
date
$curl_get $ES_URL/_cat/health?v
$curl_get $ES_URL/_cat/nodes?v
$curl_get $ES_URL/_cat/indices?v 2>&1 | grep -vE "^green"
$curl_get $ES_URL/_cat/indices?v 2>&1 | grep "searchguard"
@mgoodness
mgoodness / k8s-svc-annotations.md
Last active March 11, 2024 16:24
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
admissionConfig:
pluginConfig: null
apiLevels:
- v1
apiVersion: v1
assetConfig:
extensionDevelopment: false
extensionProperties: null
extensionScripts:
- /etc/origin/master/online-extensions.js
@vratiu
vratiu / .bash_aliases
Last active May 6, 2024 17:58
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@mkweskin
mkweskin / gist:5414303
Last active November 13, 2023 15:52
Convert markdown to mediawiki with pandoc
pandoc -f markdown -t mediawiki test.md -o test.wiki
# Thanks to @tillmanj for the updated formatting
@fernandoaleman
fernandoaleman / gist:5083680
Last active October 17, 2023 12:02
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.