Skip to content

Instantly share code, notes, and snippets.

View svanschalkwyk's full-sized avatar

Steph van Schalkwyk svanschalkwyk

View GitHub Profile
<?xml version='1.0' encoding='UTF-8'?>
<docs>
<doc-add>
<reference>https://grocery.walmart.com/ip/Fresh-Raspberries-12-oz/44390957</reference>
<metadata>
<meta name="p_short_description">Relish in the sweet, light flavor of Fresh Raspberries. Enjoy them for breakfast, lunch, dinner, or dessert. Use them as topping for decadent chocolate cake, bake them in mouthwatering scones, or create a tangy sauce and serve it over a grilled salmon fillet, or puree them for a sweet jam. They contain essential vitamins and nutrients like, vitamin C, vitamin K, iron, and manganese making them perfect for a healthy diet. Prior to serving simply gently wash them with cool water and enjoy the fresh taste. Refrigerate the berries to keep them fresh and ready for use. Pick up Fresh Raspberries today and savor the delectable flavor.</meta>
<meta name="p_sku">3000213284</meta>
<meta name="p_features">Raspberries</meta>
<meta name="p_features">Relish in the sweet, light flavor of Fresh Raspberries.
<tagger class="com.norconex.importer.handler.tagger.impl.DOMTagger" parser="html" >
<dom toField="p_name" selector="[class^=ProductPage__title___]" extract="text" defaultValue="NAME"/>
<dom toField="p_price" selector=".Price__salePrice___3YEJa.Price__salePriceItemDetail___3zgGh" extract="html" />
<dom toField="p_ingredients" selector="[data-automation-id=ingredients] div" extract="text"/>
<dom toField="p_similar_products" selector=".productTile__productTileImageLink___1k1Vd" extract="attr(href)"/>
<dom toField="p_images" selector="img.prod-HeroImageCarousel-image" extract="attr(src)"/>
<dom toField="p_prod_image" selector="[data-tl-id=ProductPage-primary-image]" extract="outerHtml"/>
<dom toField="p_sku" selector=".productTile__details___3lfva .productTile__hiddenSku___fT5S0" extract="html"/>
<dom toField="p_features" selector=".ProductAttribute__value2___1VnqJ" extract="text"/>
from sawtooth_signing import create_context
from sawtooth_signing import CryptoFactory
from hashlib import sha512
from sawtooth_sdk.protobuf.transaction_pb2 import TransactionHeader
import cbor
from sawtooth_sdk.protobuf.transaction_pb2 import Transaction
from sawtooth_sdk.protobuf.transaction_pb2 import TransactionList
from sawtooth_sdk.protobuf.batch_pb2 import BatchHeader
from sawtooth_sdk.protobuf.batch_pb2 import Batch
from sawtooth_sdk.protobuf.batch_pb2 import BatchList
ES:
root@elastic01:/home/steph# cat /var/log/elasticsearch/104.154.164.193-elastic01/gce-cluster.log
[2017-08-21T02:27:18,491][INFO ][o.e.n.Node ] [elastic01_master] initializing ...
[2017-08-21T02:27:18,596][INFO ][o.e.e.NodeEnvironment ] [elastic01_master] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [8.1gb], net total_space [9.6gb], spins? [possibly], types [ext4]
[2017-08-21T02:27:18,596][INFO ][o.e.e.NodeEnvironment ] [elastic01_master] heap size [1015.6mb], compressed ordinary object pointers [true]
[2017-08-21T02:27:18,599][INFO ][o.e.n.Node ] [elastic01_master] node name [elastic01_master], node ID [OJSX7UlrQJikmjVuB4DxIQ]
[2017-08-21T02:27:18,599][INFO ][o.e.n.Node ] [elastic01_master] version[5.5.1], pid[8337], build[19c13d0/2017-07-18T20:44:24.823Z], OS[Linux/4.10.0-32-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_131/25.131-b11]
[2017-08-21T02:27:18,599][INFO ][o.e.n.Node ] [elastic01_master]
[2017-08-20T18:52:48,929][INFO ][o.e.n.Node ] [elastic01_master] initializing ...
[2017-08-20T18:52:49,102][INFO ][o.e.e.NodeEnvironment ] [elastic01_master] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [8.1gb], net total_space [9.6gb], spins? [possibly], types [ext4]
[2017-08-20T18:52:49,107][INFO ][o.e.e.NodeEnvironment ] [elastic01_master] heap size [1015.6mb], compressed ordinary object pointers [true]
[2017-08-20T18:52:49,110][INFO ][o.e.n.Node ] [elastic01_master] node name [elastic01_master], node ID [b6zJQfh8RM-8zFGxfhHX9A]
[2017-08-20T18:52:49,110][INFO ][o.e.n.Node ] [elastic01_master] version[5.5.1], pid[8233], build[19c13d0/2017-07-18T20:44:24.823Z], OS[Linux/4.10.0-32-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_131/25.131-b11]
[2017-08-20T18:52:49,111][INFO ][o.e.n.Node ] [elastic01_master] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+U
@svanschalkwyk
svanschalkwyk / .bachrc
Created January 29, 2017 18:43
.bashrc
export PATH=/opt/VirtualGL/bin:/opt/TurboVNC/bin:$PATH
export OPENCV_TEST_DATA_PATH=/home/steph/Projects/opencv/opencv_extra/testdata
source /opt/intel/mkl/bin/mklvars.sh intel64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/compilers_and_libraries_2017.0.098/linux/compiler/lib/intel64_lin/
export LD_PRELOAD=/opt/intel/mkl/lib/intel64/libmkl_core.so:/opt/intel/mkl/lib/intel64/libmkl_sequential.so
# added by Anaconda2 4.2.0 installer
#export PATH="$PATH:/home/steph/anaconda3/bin:/home/steph/anaconda2/bin"
export PYTHONPATH=/usr/local/lib/python3.5/dist-packages:/home/steph/anaconda3/lib:$PYTHONPATH
#export PYTHONPATH=/usr/local/lib/python2.7/dist-packages:$PYTHONPATH
3P_LIBRARY_OUTPUT_PATH=/home/steph/Projects/opencv/build/3rdparty/lib
ALIAS=ALIASOF_libgphoto2
ALIASOF_gstreamer-app-0.10_CFLAGS=-pthread;-I/usr/include/gstreamer-0.10;-I/usr/include/glib-2.0;-I/usr/lib/x86_64-linux-gnu/glib-2.0/include;-I/usr/include/libxml2
ALIASOF_gstreamer-app-0.10_CFLAGS_I=
ALIASOF_gstreamer-app-0.10_CFLAGS_OTHER=-pthread
ALIASOF_gstreamer-app-0.10_FOUND=1
ALIASOF_gstreamer-app-0.10_INCLUDEDIR=/usr/include/gstreamer-0.10
ALIASOF_gstreamer-app-0.10_INCLUDE_DIRS=/usr/include/gstreamer-0.10;/usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/include/libxml2
ALIASOF_gstreamer-app-0.10_LDFLAGS=-lgstapp-0.10;-lgstbase-0.10;-lgstreamer-0.10;-lgobject-2.0;-lgmodule-2.0;-pthread;-lgthread-2.0;-pthread;-lglib-2.0;-lxml2
ALIASOF_gstreamer-app-0.10_LDFLAGS_OTHER=-pthread
@svanschalkwyk
svanschalkwyk / Makefile
Created January 26, 2017 23:08
OpenCV3 Makefile
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
@svanschalkwyk
svanschalkwyk / MakeFile.config
Created January 26, 2017 23:07
caffe MakeFile.config
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
# cuDNN version 4 or higher is required.
USE_CUDNN := 1
# NCCL acceleration switch (uncomment to build with NCCL)
# See https://github.com/NVIDIA/nccl
USE_NCCL := 1
@svanschalkwyk
svanschalkwyk / nccl Makefile - added sm30
Last active January 26, 2017 23:06
nccl Makefile - added sm30
#
# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
#
# See LICENCE.txt for license information
#
CUDA_HOME ?= /usr/local/cuda
PREFIX ?= /usr/local
VERBOSE ?= 0
KEEP ?= 0