Skip to content

Instantly share code, notes, and snippets.

View tocttou's full-sized avatar
🌴

Ashish Chaudhary tocttou

🌴
View GitHub Profile
---
job: JobName
nodes:
- local
- 188.166.246.108
service1:
payload:
- payload/file1.json
- payload/file2.txt
exec:
import cvfy
app = cvfy.register("nongh:0.0.0.0:5237349:5001:8003:localhost")
@cvfy.crossdomain
@app.listen()
def getsizes():
cvfy.sendGraphArray([
[
{ 'x': 'cat', 'y': 2 },
import cvfy
app = cvfy.register("nongh:0.0.0.0:5237349:5001:8003:localhost")
@cvfy.crossdomain
@app.listen()
def getsizes():
cvfy.sendGraphArray([
[
import cvfy
app = cvfy.register("nongh:0.0.0.0:6391972:3000:8005:0.0.0.0")
@cvfy.crossdomain
@app.listen()
def runner():
cvfy.sendTextArrayToTerminal(['This data will be sent before output is injected in ', 'Output Component']);
cvfy.sendImageArray(['/home/abc.png', '/tmp/123.png'])
import cv2
import cvfy
app = cvfy.register('nongh:0.0.0.0:3000:8005:0.0.0.0')
@cvfy.crossdomain
@app.listen()
def grayscale():
image_1 = cv2.imread('/home/abc.png') ## a numpy array
image_2 = cv2.imread('/tmp/123.jpg') ## a numpy array
import cvfy
app = cvfy.register("nongh:0.0.0.0:6391972:3000:8005:0.0.0.0")
@cvfy.crossdomain
@app.listen()
def runner():
cvfy.sendImageArray(['/home/abc.png', '/tmp/123.png'])
return 'OK'
import cvfy
app = cvfy.register("nongh:0.0.0.0:6391972:3000:8005:0.0.0.0")
@cvfy.crossdomain
@app.listen()
def runner():
cvfy.sendTextArray(['Hello', 'World'])
return 'OK'
import cv2
import cvfy
app = cvfy.register('nongh:107.170.77.168:6391972:3000:8005:107.170.77.168')
@cvfy.crossdomain
@app.listen()
def grayscale():
all_image_paths = cvfy.getImageArray()
import cvfy
app = cvfy.register('nongh:0.0.0.0:1814173:5001:9001:0.0.0.0')
@cvfy.crossdomain
@app.listen()
def concat():
## receiving the data
## lets say the webapp has 2 entries in Text Input Component with inputs given by user: 'ABC' and 'XYZ'
import cvfy
# all memory/processor intensive work that is to be done only once (like loading models) goes here
app = cvfy.register("nongh:0.0.0.0:1814173:5001:9001:0.0.0.0")
@cvfy.crossdomain
@app.listen()
def runner():
#do nothing