I am trying auto desk forge api to create a mesh from images but unable to upload photos getting error code 19.
I tried-
curl -X POST \
https://developer.api.autodesk.com/photo-to-3d/v1/file \
-H 'authorization: Bearer xxx' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-H 'postman-token: e25fbfb0-3754-e48f-4f0f-cac34bfd9df2' \
-F 'file[0]=#IMG_20200930_180808.jpg' \
-F 'file[1]=#IMG_20200930_180814.jpg' \
-F 'file[2]=#IMG_20200930_180820.jpg' \
-F 'file[3]=#IMG_20200930_180830.jpg' \
-F type=image \
-F photosceneid=<some sceneid>
Please suggest if any thing missing, I have to use it through postman.
As Christian mentioned, code 19 means that the photoscene you are referring to does not exist. Make sure to create the photoscene using the POST photoscene endpoint before uploading images to it, for example, like so:
curl -v 'https://developer.api.autodesk.com/photo-to-3d/v1/photoscene' \
-X 'POST' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6...' \
-d 'scenename=testscene' \
-d 'format=rcm,rcs,ortho' \
-d 'metadata_name[0]=targetcs' \
-d 'metadata_value[0]=UTM84-32N'
Related
I want to purge my parachain collator node, but I got this error
Input("Error parsing spec file: missing field `relay_chain` at line 143 column 1")(cannot purge parachain)
This is the command I used to purge my parachain
./target/release/parachain-collator purge-chain --base-path /tmp/parachain/alice --chain rococo-custom.json
This is the command I used to run this parachain-collator
./target/release/parachain-collator \
--alice \
--collator \
--force-authoring \
--parachain-id 2000 \
--base-path /tmp/parachain/alice \
--port 40333 \
--ws-port 8844 \
-- \
--execution wasm \
--chain rococo-custom.json \
--port 30343 \
--ws-port 9977
Thank you so much for your help!
./XXX/parachain-collator purge-chain --base-path <your collator DB path set above>
no need args for chainspec.
I'm currently making a number of graphs for users on a server.
The code 'm using is as follows:
$RRDTOOL graph $SCUMCOUNTPATH/mtghour.png \
--start now-3600s --end now \
--alt-autoscale \
-w 343 -h 85 \
--lower-limit 0 \
--title "Last 90 Minutes" \
--color CANVAS#36393f00 \
--color BACK#36393f00 \
--color FONT#5b80e0 \
--color GRID#888888 \
--color MGRID#888888 \
--color SHADEA#36393f \
--color SHADEB#36393f \
--x-grid MINUTE:5:HOUR:20:MINUTE:30:0:%M \
--alt-y-grid --rigid \
--left-axis-format %2.0lf \
--rigid \
--watermark "$(date +'%a %b %d %H:%M %Z %Y')" \
DEF:nowcount=$SCUMCOUNTPATH/mtg.rrd:count:AVERAGE \
CDEF:up=nowcount,0,*,0,EQ,0,1,IF \
TICK:up#3b455e:1.0 \
LINE2:nowcount#5b80e0: \
GPRINT:nowcount:LAST:" Current\:%2.0lf" \
GPRINT:nowcount:AVERAGE:"Average\:%2.1lf" \
GPRINT:nowcount:MAX:"Maximum\:%2.0lf " >/dev/null
What this produces is this:
What I would like it to produce is this (Photoshopped):
Extra info:
I'm using RRDtool 1.5.5 in a linux environment and running the script with BASH scheduled with cron.
The option you require is --y-grid, or possibly --alt-y-grid.
First try using --alt-y-grid which tries to use a more intelligent algorithm to calculate optimum line placement. It might work better for you in general.
Failing that, try --y-grid 1:1. This means "put a line every 1.0, and label every line". As comparison, what you're seeing in your first graph (that you don't want) is --y-grid 0.1:10 where a line goes every 0.1 but only 1 in 10 are labelled.
More details in the RRDTool documentation here
Runnning the dataeng-machine-learning codelab on step 9. 4. Feature Engineering.
The notebook step for running a tarin job is:
%%bash
OUTDIR=gs://${BUCKET}/taxifare/ch4/taxi_trained
JOBNAME=lab4a_$(date -u +%y%m%d_%H%M%S)
echo $OUTDIR $REGION $JOBNAME
gsutil -m rm -rf $OUTDIR
gcloud ml-engine jobs submit training $JOBNAME \
--region=$REGION \
--module-name=trainer.task \
--package-path=${REPO}/courses/machine_learning/feateng/taxifare/trainer \
--job-dir=$OUTDIR \
--staging-bucket=gs://$BUCKET \
--scale-tier=BASIC \
--runtime-version=1.0 \
-- \
--train_data_paths="gs://$BUCKET/taxifare/ch4/taxi_preproc/train*" \
--eval_data_paths="gs://${BUCKET}/taxifare/ch4/taxi_preproc/valid*" \
--output_dir=$OUTDIR \
--num_epochs=100
That works great no matter how many time I run it.
However if I run:
%%bash
OUTDIR=gs://${BUCKET}/taxifare/ch4/taxi_trained
JOBNAME=lab4a_$(date -u +%y%m%d_%H%M%S)
echo $OUTDIR $REGION $JOBNAME
gsutil -m rm -rf $OUTDIR
gcloud ml-engine jobs submit training $JOBNAME \
--region=$REGION \
--module-name=trainer.task \
--package-path=${REPO}/courses/machine_learning/feateng/taxifare/trainer \
--job-dir=$OUTDIR \
--staging-bucket=gs://$BUCKET \
--scale-tier=BASIC \
--runtime-version=1.0 \
-- \
--train_data_paths="gs://$BUCKET/taxifare/ch4/taxi_preproc/train*" \
--eval_data_paths="gs://${BUCKET}/taxifare/ch4/taxi_preproc/valid*" \
--output_dir=$OUTDIR \
--num_epochs=100 \
--verbosity DEBUG
Job fails after about 40 sec. with this in the logs:
The replica master 0 exited with a non-zero status of 2. Termination reason: Error.
I've found this usage in here:
https://cloud.google.com/ml-engine/docs/how-tos/getting-started-training-prediction#cloud-train-single
So I guesss it's ok to use.
What am I doing wrong?
Note that every argument after the "-- \" line is a pass through to the tensorflow code and is therefore dependent on the individual sample code.
In this case, the "--verbosity" flag isn't supported by the sample you are running. Looking at the samples repo, it looks like the only sample that has that flag is the census estimator sample.
The taxifare example is currently hardcoded to INFO, and the code doesn't parse the --verbose flag.
How do i add --data-urlencode parameter to postman as that is my main issue.
curl -X GET \
-H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"playerName":"Sean Plott","cheatMode":false}' \
https://api.parse.com/1/classes/GameScore
Thanks.
Provide -H values in Headers
Use below GET url
https://api.parse.com/1/classes/GameScore?where={"playerName":"Sean Plott","cheatMode":false}
I added texturePacker script to export sprite sheet and its working. I would like to know how to set 'Pre Multiply Alpha' and 'NPot any size' while exporting sheet through Xcode script?
Here is my present Code:
TP="/usr/local/bin/TexturePacker"
${TP} --smart-update \
--format cocos2d \
--padding 2 \
--main-extension "-ipadhd" \
--autosd-variant 0.5:-ipad \
--autosd-variant 0.5:-hd \
--autosd-variant 0.25: \
--opt RGBA8888 \
--data iOS/Resources/Game_SpriteSheet/CBirdSpriteSheet_1-ipadhd.plist \
--sheet iOS/Resources/Game_SpriteSheet/CBirdSpriteSheet_1-ipadhd.pvr.ccz \
SpriteSheet/Sprite_Sheet_1/*.png
Screenshot from external texture packer. I want same in script.
Have you tried adding the --premultiply-alpha and --size-constraints <value> options to the command? [1]
TP="/usr/local/bin/TexturePacker"
${TP} --smart-update \
--format cocos2d \
--padding 2 \
--main-extension "-ipadhd" \
--autosd-variant 0.5:-ipad \
--autosd-variant 0.5:-hd \
--autosd-variant 0.25: \
--opt RGBA8888 \
--premultiply-alpha \
--size-constraints NPOT \
--data iOS/Resources/Game_SpriteSheet/CBirdSpriteSheet_1-ipadhd.plist \
--sheet iOS/Resources/Game_SpriteSheet/CBirdSpriteSheet_1-ipadhd.pvr.ccz \
SpriteSheet/Sprite_Sheet_1/*.png
[1] http://www.codeandweb.com/texturepacker/documentation