Skip to content

Instantly share code, notes, and snippets.

View planetA's full-sized avatar

Maksym Planeta planetA

View GitHub Profile
@planetA
planetA / Makefile
Last active September 4, 2020 14:54
Does sched_yield work?
CFLAGS=-pthread
all: test
@planetA
planetA / config-5.2.0+
Last active October 2, 2019 15:44
docker dump log
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.2.0 Kernel Configuration
#
#
# Compiler: gcc (Debian 8.3.0-6) 8.3.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=80300
@planetA
planetA / dump.log
Created October 31, 2018 12:44
C/R logs
(00.000007) Version: 3.9 (gitid v3.9)
(00.000028) Running on ib2 Linux 4.18.0-2-amd64 #1 SMP Debian 4.18.10-2 (2018-10-07) x86_64
(00.000055) ========================================
(00.000060) Dumping processes (pid: 17657)
(00.000061) ========================================
(00.000063) Running pre-dump scripts
(00.000064) RPC
(00.000337) irmap: Searching irmap cache in work dir
(00.000346) No irmap-cache image
(00.000348) irmap: Searching irmap cache in parent
@planetA
planetA / main.go
Created October 13, 2018 10:51
test-runc
package main
import (
"fmt"
"golang.org/x/sys/unix"
"log"
"os"
"runtime"
"github.com/opencontainers/runc/libcontainer"
@planetA
planetA / minimal.py
Created May 9, 2018 15:17
RNN with single output
#!/usr/bin/env python3
import csv
import tensorflow as tf
from tensorflow.contrib.feature_column import sequence_categorical_column_with_identity, sequence_input_layer
from random import shuffle
import numpy as np
with open('train.tsv') as f:
class Conv2DWrap:
def __batch_normalization(self, x):
x = tf.layers.batch_normalization(x, training=self.training)
return x
def __init__(self, inp, training, alpha, drop_rate=None):
self.last_layer = inp
self.current_layer = 0
self.alpha = alpha
self.drop_rate = drop_rate
@planetA
planetA / Dockerfile
Last active November 17, 2017 20:33
Restoring OpenMPI inside Docker
# OpenMPI in Docker
#
# Don't use such setup in production, because it is not secure. This
# image is just a proof-of-concept.
#
# Have a look at Singularity, because it allows to run containers
# without effectively giving away root priveleges.
FROM debian:9
MAINTAINER "Maksym Planeta <mplaneta@os.inf.tu-dresden.de>"
@planetA
planetA / nonworking.log
Created November 13, 2017 10:34
mpirun in docker
$ mpirun -H 10.0.1.3,10.0.1.4,10.0.1.5,10.0.1.6 --mca oob_base_verbose 100 hostname
[abcd42c8cffe:00160] mca: base: components_register: registering framework oob components
[abcd42c8cffe:00160] mca: base: components_register: found loaded component tcp
[abcd42c8cffe:00160] mca: base: components_register: component tcp register function successful
[abcd42c8cffe:00160] mca: base: components_register: found loaded component usock
[abcd42c8cffe:00160] mca: base: components_register: component usock register function successful
[abcd42c8cffe:00160] mca: base: components_open: opening oob components
[abcd42c8cffe:00160] mca: base: components_open: found loaded component tcp
[abcd42c8cffe:00160] mca: base: components_open: component tcp open function successful
[abcd42c8cffe:00160] mca: base: components_open: found loaded component usock
$ openssl x509 -text -noout -in certs/domain.crt
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
ab:8b:61:9a:20:ec:0b:a0
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Oregon, L = Portland, O = Company Name, OU = Org, CN = *
Validity
Not Before: Nov 11 12:49:55 2017 GMT
@planetA
planetA / openssl.log
Created November 11, 2017 12:21
Certificate contents
$ openssl x509 -text -noout -in certs/domain.crt
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
c3:62:bb:00:42:c9:13:2b
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Oregon, L = Portland, O = Company Name, OU = Org, CN = openmpi-dockerregistry.local
Validity
Not Before: Nov 11 12:06:14 2017 GMT