Skip to content

Instantly share code, notes, and snippets.

Christian Kniep ChristianKniep

Block or report user

Report or block ChristianKniep

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am christiankniep on github.
  • I am qnib (https://keybase.io/qnib) on keybase.
  • I have a public key ASCoyIRNZWEzP3x0O_-oe8Qbdfl_rVnjni3A6H4At_rDtQo

To claim this, I am signing this object:

@ChristianKniep
ChristianKniep / main.go
Created Jun 16, 2017
Parse DockerBench
View main.go
package main
import (
"bufio"
"fmt"
"log"
"regexp"
"os"
)
View ContainerJSON_to_Container
package main
import (
"github.com/docker/docker/client"
"github.com/docker/docker/api/types"
"golang.org/x/net/context"
"encoding/json"
"fmt"
)
@ChristianKniep
ChristianKniep / gist:2b13b0a01ebd99a82e0b7ffb2710c624
Last active Jun 9, 2016
docker/engine-api example to extract JSON docker-stats
View gist:2b13b0a01ebd99a82e0b7ffb2710c624
package main
import (
"fmt"
"io/ioutil"
"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
"golang.org/x/net/context"
)
@ChristianKniep
ChristianKniep / iter_docker_images
Last active Aug 29, 2015
Iterate through image list on registry.hub.docker.io
View iter_docker_images
from bs4 import BeautifulSoup
from graphitesend import graphitesend
import requests
import re
gsend = graphitesend.init(graphite_server='localhost', group='dockerhub', system_name="", prefix="")
req = requests.get("https://registry.hub.docker.com/repos/qnib/")
data = req.text
soup = BeautifulSoup(data)
res = {}
@ChristianKniep
ChristianKniep / extract_image_downloads
Created Sep 15, 2014
Fetch downloads from registry.hub.docker.io
View extract_image_downloads
from bs4 import BeautifulSoup
import requests
req = requests.get("https://registry.hub.docker.com/u/qnib/monster/")
data = r.text
soup = BeautifulSoup(data)
for div in soup.findAll("span", class_="downloads"):
print div.text
@ChristianKniep
ChristianKniep / create_rangeset.sh
Created Apr 30, 2014
Create a rangeset out of a list of integer (used within clustershell, slurm.conf, ...).
View create_rangeset.sh
function create_rangeset {
# consumes a list of integers and creates a rangeset
####
# $ create_rangeset 0 1 2 5 6 {10..50}
# 0-2,5-6,10-50
RSET=""
CNT="-1"
PREV_CNT="-1"
for INT in $*;do
View carboniface.py
import socket
import pickle
import random
import time
import struct
import threading
import urllib2
#from sc_watchdog.logger import log
You can’t perform that action at this time.