# normal(explicitly specified start AND end)
curl -v -X GET -H "range: bytes=1-8" http://localhost:8080/bbb/test
# specified ONLY start(end will be specified at the end of file)
curl -v -X GET -H "range: bytes=10-" http://localhost:8080/bbb/test
# specified ONLY one negative value(last N bytes of file will be retrieved)
curl -v -X GET -H "range: bytes=-11" http://localhost:8080/bbb/test
This file contains 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
const fork = require('child_process').fork; | |
const child = fork(require('path').join(__dirname, 'grand-child.js')); | |
new Promise(r => child.once('message', r)).then(c => process.send(c)); | |
child.on('exit', process.exit); | |
var count =Math.floor(Math.random()*100); | |
process.on('message', async (msg)=>{ | |
console.log("CHILD: message received from parent process", msg); |
This file contains 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
.mode column | |
.headers ON |
This file contains 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
# usage: `python ~/Desktop/contours.py 1994-654-12_v02.tif` | |
# output is to a squareless.txt file and the directory "out" | |
# Working well with thumbnails with 400px as their longest side - untested with other dimensions | |
# for i in $(ls -1 | grep tif); do python /Users/artsyinc/Documents/resistance/experiments/artwork_image_cropping/contours.py $i; done | |
import cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
import sys |