Skip to content

Instantly share code, notes, and snippets.

View go-install.sh
#!/bin/bash
set -e
VERSION="1.17.3"
[ -z "$GOROOT" ] && GOROOT="$HOME/.go"
[ -z "$GOPATH" ] && GOPATH="$HOME/go"
OS="$(uname -s)"
ARCH="$(uname -m)"
View feeds.go
feedsOutput := tf.Output{
Op: savedModel.Graph.Operation("CAPTCHA/input_image_as_bytes"),
Index: 0,
}
// `buf` is a Buffer with the captcha image fetched from the website
feedsTensor, err := tf.NewTensor(string(buf.String()))
if err != nil {
log.Fatal(err)
@emedvedev
emedvedev / tfrecords.py
Created Jul 19, 2017
Converting an OCR dataset for Tensorflow into a singular TFRecords file
View tfrecords.py
import tensorflow as tf
def _bytes_feature(value):
return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))
def _int64_feature(value):
return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))
View keybase.md

Keybase proof

I hereby claim:

  • I am emedvedev on github.
  • I am emedvedev (https://keybase.io/emedvedev) on keybase.
  • I have a public key whose fingerprint is E722 2DB7 7559 FD94 B2DC AB0F F29B 9D98 505A FD45

To claim this, I am signing this object:

View Version selectors.md

1. If you install a pack without specifying a version, you will end up, quite predictably, on the latest master.

    $ st2 pack install cloudflare
    
    [...]

    $ git status
        On branch master
        Your branch is up-to-date with 'origin/master'.
View peer-matchmaking.yaml
swagger: '2.0'
info:
title: Peer Matchmaking API
description: Analyse your traffic to find beneficial peering agreements.
version: "1.0.0"
host: api.example.org
schemes:
- https
basePath: /v1
produces:
View gist:faf42e64cdaabe3280527de14bc7e4d5
5:]6) 4;4H? 16*T) ;46)- (:.;H H2
Z6H?) ;4:*8 C;78: 6)]6* ;8(9? ;8
LRMEA DODHU WEITA ODEAY NRBOH HJ
ZEHUA ODRIS COVSR EAMEI OSNFU OS
View gist:9bd76a783ee7b438a75ebc950bcd456c
2016-04-11T17:24:04.436592+00:00 localhost st2api[14471]: INFO 140132614642416 [-] a21fcc03-ea16-4018-b06d-2b253aada628 - POST /v1/aliasexecution result={"actionalias": {"description": "Download StackStorm packs via ChatOps", "extra": {}, "ack": {}, "enabled": true, "result": {}, "formats": ["pack deploy {{packs}} from {{repo_url}}", "pack deploy {{packs}}"], "uid": "action:packs:deploy_pack", "action_ref": "packs.install", "pack": "packs", "ref": "packs.deploy_pack", "id": "570718484f66346c3f577917", "name": "deploy_pack"}, "execution": {"status": "requested", "start_timestamp": "2016-04-11T17:24:04.387511Z", "parameters": {"packs": ["st2"]}, "runner": {"runner_module": "st2actions.runners.actionchainrunner", "description": "A runner for launching linear action chains.", "enabled": true, "runner_parameters": {"skip_notify": {"default": [], "type": "array", "description": "List of tasks to skip notifications for."}, "display_published": {"default": false, "type": "boolean", "description": "Intermediate publis
View Docker-hubot init script for StackStorm
#!/bin/sh
#
# /etc/rc.d/init.d/<servicename>
#
# Daemon for hubot
#
# description: Docker container for hubot
### BEGIN INIT INFO
# Provides: docker-hubot
@emedvedev
emedvedev / result.js
Created Nov 30, 2015
ChatOps result context in StackStorm
View result.js
{
"alias": {
"uid": "action:chatops:get",
"ack": {
"format": "Got {{ execution.parameters.thing }}"
},
"enabled": true,
"name": "get",
"result": {
"enabled": false