This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_model = LOAD "https://github.com/tensorflow/models/tree/master/official/resnet" | |
my_model = EXTEND base_model REUSE 5 LAYERS | |
TRAIN my_model WITH "dfs://mycompany.com/datasets/mymodel" | |
input = INPUT "pubsub://subscriptions/myproject/raw-feed" IN FORMAT json SCALE FOR my_model | |
output = OUTPUT "pubsub://publishers/myproject/prognosis" IN FORMAT json | |
EXECUTE my_model ON input INTO output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!DataRepository | |
db: mydb | |
host: host.the_company.xyz | |
kwargs: {} | |
name: repo_a | |
password: the_password | |
port: '6789' | |
user: the_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.logging.log4j.EventLogger; | |
import org.apache.logging.log4j.message.StructuredDataMessage; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* @author Bohdan Mushkevych | |
* wraps Class holds List<StructuredDataMessage> and flushes it to the EventLogger | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:precise | |
MAINTAINER Bohdan Mushkevych | |
# Installing Oracle JDK | |
RUN apt-get -y install python-software-properties ;\ | |
add-apt-repository ppa:webupd8team/java ;\ | |
apt-get update && apt-get -y upgrade ;\ | |
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections ;\ | |
apt-get -y install oracle-java7-installer && apt-get clean ;\ | |
update-alternatives --display java ;\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Variables | |
USER="admin" | |
PASS="password" | |
# Assert Root User | |
SCRIPTUSER=`whoami` | |
if [ "$SCRIPTUSER" != "root" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ntp::restrict" : true, | |
"ntp::autoupdate" : true, | |
"ntp::enable" : true, | |
"ntp::servers" : [ | |
"0.centos.pool.ntp.org iburst", | |
"1.centos.pool.ntp.org iburst", | |
"2.centos.pool.ntp.org iburst" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import OrderedDict | |
class OrderedSet(OrderedDict): | |
def pop(self): | |
""" Returns and removes last element of the set """ | |
if not self: | |
raise KeyError('dictionary is empty') | |
key = next(reversed(self)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Grouping { | |
@HRowKey(components = { | |
@HFieldComponent(name = Constants.TIMEPERIOD, length = Bytes.SIZEOF_INT, type = Integer.class), | |
@HFieldComponent(name = Constants.CATEGORY, length = Constants.LENGTH_CATEGORY_NAME, type = String.class) | |
}) | |
public byte[] key; | |
/** | |
* format of the storage: | |
* {product_id : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Example { | |
@HRowKey | |
public byte[] key; | |
@HProperty(family = "stat", identifier = "number_of_users") | |
public long numberOfUsers; | |
@HMapProperty(family = "stat", identifier = "months", keyType = String.class, valueType = Integer.class) | |
public Map<String, Integer> months = new HashMap<String, Integer>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MBeanExample(object): | |
def __init__(self): | |
self.property_1 = 'this is' | |
self.property_2 = 'example' | |
def start_mx(self): | |
""" import MX module (which has back-reference import to self) and start it """ | |
from mx.mx import MX | |
self.mx = MX(self) | |
self.mx.start_mx_thread() |
NewerOlder