Skip to content

Instantly share code, notes, and snippets.

@mooperd
mooperd / GenusForm.vue.js
Created June 7, 2020 07:58
GenusForm.vue
<template>
<!-- if open is true show the dialog -->
<v-dialog v-model="open" max-width="600px">
<v-card>
<!-- error goes here -->
<!--The directive v-if is used to conditionally render a block. -->
<!-- The block will only be rendered if the directive’s expression returns a truthy value. -->
<div v-if="error" class="text-center">
<h2>{{ error }}</h2>
</div>
import boto3
import ujson
import arrow
import sys
import os
import getpass
from pyspark.sql import SQLContext
from pyspark import SparkContext
from pyspark.sql.types import *

DC/OS v.1.8.4
Spark 2.0.1
Python Version: 3.4.3 (default, Sep 14 2016, 12:36:27)
[cqlsh 5.0.1 | Cassandra 2.2.8 | CQL spec 3.3.1 | Native protocol v4]

I have some data stored in a single node cassandra which I would like to access from apache spark running on DC/OS. I'm afraid I've become rather stuck on this problem.

cqlsh:dev> select count(*) from time;
#!/bin/bash
#
# dhclient-script: Network interface configuration script run by
# dhclient based on DHCP client communication
#
# Copyright (C) 2008-2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@mooperd
mooperd / server.conf
Created August 15, 2015 07:35
Openvpn Server.conf
#################################################
# Sample OpenVPN 2.0 config file for #
# multi-client server. #
# #
# This file is for the server side #
# of a many-clients <-> one-server #
# OpenVPN configuration. #
# #
# OpenVPN also supports #
# single-machine <-> single-machine #
ifconfig_igb1="up"
ifconfig_igb2="up"
ifconfig_igb3="up"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto lacp laggport igb1 laggport igb2 laggport igb3 inet 109.71.48.252 netmask 255.255.254.0"
defaultrouter="109.71.48.1"
#!/bin/bash
exec 3<> /dev/tcp/${1:-localhost}/4949
printf "list" >&3
printf "\r\n" >&3
while read -ra line <&3
do for word in "${line[@]}"
do printf 'fetch %s\n' "$word"
while read -r fline <&3
hybrid@node004:~$ telnet localhost 4949
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
# munin node at node004
list
cpu hc_cpuusage hc_currentmasters hc_diskusage hc_dmuwrite hc_iostat_pcb hc_iostat_qlen hc_iostat_svc_t hc_lmsuccesses hc_load hc_memoryusage hc_oplatency hc_opqueue hc_replatency hc_replatencyperserver hc_repsuccesses hc_snapshotdelay hc_spasync hc_spreadlatencies hc_underrep-filesystems hc_writetimer if_em0 if_errcoll_em0 if_errcoll_usbus if_usbus iostat load memory netstat ntp_kernel_err ntp_kernel_pll_freq ntp_kernel_pll_off ntp_offset ntp_states open_files sendmail_mailqueue sendmail_mailstats sendmail_mailtraffic swap systat uptime users
fetch hc_spasync
#!/bin/bash
exec 3<> /dev/tcp/${1:-localhost}/4949
printf "list" >&3
printf "\r\n" >&3
while read LINE <&3
do
for i in $LINE
do