Skip to content

Instantly share code, notes, and snippets.

@JackFurby
JackFurby / make_coco_json.py
Created October 26, 2020 10:56
This script will generate a JSON file (coco.json) for use with training models from https://github.com/vmurahari3/visdial-diversity and https://github.com/batra-mlp-lab/visdial-rl
from glob import glob
import json
jsonObject = {"images": []}
for splitPath in glob("./coco/images/*[!.zip]"): # Only select extracted folders from zips files
for imagePath in glob(splitPath + "/*"):
imagePath = imagePath.split("/")
# set split var depending on folder name containing images
if imagePath[3] == "train2017":
@JackFurby
JackFurby / Flask_app_in_Virtualmin.md
Last active December 5, 2024 23:49
Deploy a Flask app in Virtualmin

How to setup a Flask app in Virtualmin

before I start, for full disclosure this is not really a guide on how to set up a Flask app in Virtualmin. It will achive it but as you may know Virtual min does not support Python apps. For this reason it will be in two parts. Part 1 with be in Virtualmin setting up the space for the app on a server and part 2 will be setting up the app in Apachie.

Virtualmin

  1. Create virtual server
  2. Add Flask app files into virtual server public_html folder (e.g. /home/virtual_server/public_html)

Apache