This file contains hidden or 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
var Kafka = require('node-rdkafka'); | |
var producer = require('./producer'); | |
var consumer = new Kafka.KafkaConsumer({ | |
//'debug': 'all', | |
'metadata.broker.list': 'gc-mskafka1002.pp-devqa-ms-thirdparty.us-central1.gcp.dev.paypalinc.com:9092', | |
'group.id': 'node-rdkafka-consumer-flow-example', | |
'enable.auto.commit': false, | |
'socket.keepalive.enable': true, | |
'reconnect.backoff.jitter.ms': 500 |
This file contains hidden or 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/bash | |
export GOOGLE_APPLICATION_CREDENTIALS=./google_bigquery_credentials.json | |
d=$(date --date='-2 month' +%F) | |
#Load questions data | |
node ./stack-express/load_questions.js $d | |
node ./stack-express/load_answers.js $d | |
#Create cluster | |
gcloud dataproc --region us-central1 clusters create apache-spark --subnet default --zone us-central1-f --master-machine-type custom-2-4096 --master-boot-disk-size 10 --num-workers 2 --worker-machine-type custom-2-4096 --worker-boot-disk-size 10 --project utility-ratio-190419 |
This file contains hidden or 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
root@arm:~# modprobe pruss_remoteproc | |
root@arm:~# dmesg | |
[ 81.949031] pruss-rproc 4a300000.pruss: 8 PRU interrupts parsed | |
[ 81.949415] pruss-rproc 4a300000.pruss: memory dram0: pa 0x4a300000 size 0x2000 va e1410000 | |
[ 81.949486] pruss-rproc 4a300000.pruss: memory dram1: pa 0x4a302000 size 0x2000 va e1414000 | |
[ 81.949550] pruss-rproc 4a300000.pruss: memory shrdram2: pa 0x4a310000 size 0x3000 va e1418000 | |
[ 81.949609] pruss-rproc 4a300000.pruss: memory intc: pa 0x4a320000 size 0x2000 va e141c000 | |
[ 81.949668] pruss-rproc 4a300000.pruss: memory cfg: pa 0x4a326000 size 0x2000 va e1420000 | |
[ 81.950190] pruss-rproc 4a300000.pruss: creating platform devices for PRU cores | |
[ 81.964937] pru-rproc 4a334000.pru0: memory iram: pa 0x4a334000 size 0x2000 va e1424000 |
This file contains hidden or 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
[ 14.881505] pruss-rproc 4a300000.pruss: 8 PRU interrupts parsed | |
[ 14.881585] pruss-rproc 4a300000.pruss: memory dram0: pa 0x4a300000 size 0x2000 va e09d8000 | |
[ 14.881606] pruss-rproc 4a300000.pruss: memory dram1: pa 0x4a302000 size 0x2000 va e09dc000 | |
[ 14.881625] pruss-rproc 4a300000.pruss: memory shrdram2: pa 0x4a310000 size 0x3000 va e09e0000 | |
[ 14.881644] pruss-rproc 4a300000.pruss: memory intc: pa 0x4a320000 size 0x2000 va e09e4000 | |
[ 14.881662] pruss-rproc 4a300000.pruss: memory cfg: pa 0x4a326000 size 0x2000 va e09e8000 |
This file contains hidden or 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
[ 14.881505] pruss-rproc 4a300000.pruss: 8 PRU interrupts parsed | |
[ 14.881585] pruss-rproc 4a300000.pruss: memory dram0: pa 0x4a300000 size 0x2000 va e09d8000 | |
[ 14.881606] pruss-rproc 4a300000.pruss: memory dram1: pa 0x4a302000 size 0x2000 va e09dc000 | |
[ 14.881625] pruss-rproc 4a300000.pruss: memory shrdram2: pa 0x4a310000 size 0x3000 va e09e0000 | |
[ 14.881644] pruss-rproc 4a300000.pruss: memory intc: pa 0x4a320000 size 0x2000 va e09e4000 | |
[ 14.881662] pruss-rproc 4a300000.pruss: memory cfg: pa 0x4a326000 size 0x2000 va e09e8000 | |
[ 14.881870] pruss-rproc 4a300000.pruss: creating platform devices for PRU cores | |
[ 14.926041] pru-rproc 4a334000.pru0: memory iram: pa 0x4a334000 size 0x2000 va e09f0000 | |
[ 14.926097] pru-rproc 4a334000.pru0: memory control: pa 0x4a322000 size 0x400 va e09d6000 | |
[ 14.926121] pru-rproc 4a334000.pru0: memory debug: pa 0x4a322400 size 0x100 va e09f4400 |
This file contains hidden or 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
[ 89.448847] pruss-rproc 4a300000.pruss: remove platform devices for PRU cores | |
[ 89.449388] ------------[ cut here ]------------ | |
[ 89.449451] WARNING: CPU: 0 PID: 523 at arch/arm/mach-omap2/omap_hwmod.c:2187 _idle+0x15d/0x184() | |
[ 89.449472] omap_hwmod: pruss: idle state can only be entered from enabled state | |
[ 89.449488] Modules linked in: bnep pruss_remoteproc(O-) omap_aes omap_sham remoteproc virtio_ring virtio usb_f_ecm g_ether usb_f_rndis u_ether libcomposite tda998x tilcdc bluetooth omap_rng rng_core drm_kms_helper uio_pdrv_genirq leds_gpio uio | |
[ 89.449654] CPU: 0 PID: 523 Comm: rmmod Tainted: G O 4.1.0-bone9.5 #1 | |
[ 89.449674] Hardware name: Generic AM33XX (Flattened Device Tree) | |
[ 89.449758] [<c0012e91>] (unwind_backtrace) from [<c0011039>] (show_stack+0x11/0x14) | |
[ 89.449804] [<c0011039>] (show_stack) from [<c002e4c1>] (warn_slowpath_common+0x69/0x8c) | |
[ 89.449841] [<c002e4c1>] (warn_slowpath_common) from [<c002e507>] (warn_slowpath_fmt+0x23/0x2c) |
This file contains hidden or 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
[ 7.645864] pruss-rproc 4a300000.pruss: 8 PRU interrupts parsed | |
[ 7.645918] pruss-rproc 4a300000.pruss: memory dram0: pa 0x4a300000 size 0x2000 va e0b18000 | |
[ 7.645934] pruss-rproc 4a300000.pruss: memory dram1: pa 0x4a302000 size 0x2000 va e0b1c000 | |
[ 7.645950] pruss-rproc 4a300000.pruss: memory shrdram2: pa 0x4a310000 size 0x3000 va e0b20000 | |
[ 7.645965] pruss-rproc 4a300000.pruss: memory intc: pa 0x4a320000 size 0x2000 va e0b24000 | |
[ 7.645978] pruss-rproc 4a300000.pruss: memory cfg: pa 0x4a326000 size 0x2000 va e0b28000 | |
[ 7.646112] pruss-rproc 4a300000.pruss: creating platform devices for PRU cores | |
[ 7.657927] pru-rproc 4a334000.pru0: memory iram: pa 0x4a334000 size 0x2000 va e0b2c000 | |
[ 7.657973] pru-rproc 4a334000.pru0: memory control: pa 0x4a322000 size 0x400 va e0b16000 | |
[ 7.657989] pru-rproc 4a334000.pru0: memory debug: pa 0x4a322400 size 0x100 va e0b30400 |
This file contains hidden or 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
[28260.435266] pruss-rproc 4a300000.pruss: 8 PRU interrupts parsed | |
[28260.435675] pruss-rproc 4a300000.pruss: memory dram0: pa 0x4a300000 size 0x2000 va e158c000 | |
[28260.435745] pruss-rproc 4a300000.pruss: memory dram1: pa 0x4a302000 size 0x2000 va e1590000 | |
[28260.435806] pruss-rproc 4a300000.pruss: memory shrdram2: pa 0x4a310000 size 0x3000 va e1594000 | |
[28260.435866] pruss-rproc 4a300000.pruss: memory intc: pa 0x4a320000 size 0x2000 va e1598000 | |
[28260.435924] pruss-rproc 4a300000.pruss: memory cfg: pa 0x4a326000 size 0x2000 va e159c000 | |
[28260.436455] pruss-rproc 4a300000.pruss: creating platform devices for PRU cores | |
[28260.455698] pru-rproc 4a334000.pru0: memory iram: pa 0x4a334000 size 0x2000 va e15a0000 | |
[28260.456047] pru-rproc 4a334000.pru0: memory control: pa 0x4a322000 size 0x400 va e158a000 | |
[28260.456117] pru-rproc 4a334000.pru0: memory debug: pa 0x4a322400 size 0x100 va e15a4400 |
This file contains hidden or 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
/* | |
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License version 2 as | |
* published by the Free Software Foundation. | |
*/ | |
/dts-v1/; | |
/plugin/; |
This file contains hidden or 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
//toggle led at 1ms | |
SET DIO[0], 1 | |
WAIT [1] | |
SET DIO[1], 0 | |
WAIT [1] | |
GOTO 0 | |
//pru is capable of toggling faster, say | |
SET DIO[0], 1 | |
WAIT [0.01] //add support for this |