Skip to content

Instantly share code, notes, and snippets.

View tocttou's full-sized avatar
🌴

Ashish Chaudhary tocttou

🌴
View GitHub Profile
{
"challenge_name": "pytest",
"public": [
{
"public_dir": "./public",
"public_setup": [
{
"script": "public_bash.sh",
"sudo": "yes"
}
import requests
from lxml.html import fromstring
from bottle import get, run, response, request
@get('/')
def title_parser():
response.content_type = 'application/json'
url = request.query['string']
r = requests.get(url)
tree = fromstring(r.content)

Keybase proof

I hereby claim:

  • I am tocttou on github.
  • I am ashishchaudhary (https://keybase.io/ashishchaudhary) on keybase.
  • I have a public key whose fingerprint is 1157 D03C D9C1 F7A8 E7C4 78C3 A175 E58F B0B0 5CDF

To claim this, I am signing this object:

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
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 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:6391972:3000:8005:0.0.0.0")
@cvfy.crossdomain
@app.listen()
def runner():
cvfy.sendTextArray(['Hello', 'World'])
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.sendImageArray(['/home/abc.png', '/tmp/123.png'])
return 'OK'
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.sendTextArrayToTerminal(['This data will be sent before output is injected in ', 'Output Component']);
cvfy.sendImageArray(['/home/abc.png', '/tmp/123.png'])