chromeless is not saving image in correct location - chromeless

[OSX] [node 8.4.0] [chromeless 1.3.0]
I am trying to implement a test using chromeless. I am running the sample in a local instance, with one change of specifying the imagePath to save the image. It is running and saving an image however the image is being saved in the default location still. Any ideas on what I am doing wrong? My desire is to save the image relative to the directory the test was executed in.
Modified line below.
.screenshot({ filePath: './images/test1.png'} );
As I said it all runs but the image is still saved in the following location
/var/folders/r1/4xfjz/T/cjavyrbo70000kk.png

Looks like a known problem. See https://github.com/graphcool/chromeless/issues/282

Related

WebGL Marker does not show custom Icon correctly

The WebGL sample code to show custom markers is very simple but it does not work. I am interested in getting it to run on a local server successfully.
Here is the source:
https://examples.webglearth.com/#markers
and the line with the sample code that does not work:
var markerCustom = WE.marker([50, -9], '/img/logo-webglearth-white-100.png', 100, 24).addTo(earth);
It works perfectly on their website but not on my local server.
And here is my code:
// car location
var markerCustom = WE.marker([33.827284, -87.538893], 'images/car_west_small.png', 128, 125).addTo(earth);
No matter what I do, I always see the blue default blue marker. the file exists in the path and I tried varying the size to see if it was an issue with its size but still the same.
For another test I did, I also copied the original line and the original png to my local server.
var markerCustom = WE.marker([50, -9],'/img/logo-webglearth-white-100.png', 100, 24).addTo(earth);
I changed the Lat/Long to and the path
var markerCustom = WE.marker([33.827284, -87.538893], '/images/logo-webglearth-white-100.png', 100, 24).addTo(earth);
I made sure that http://localserver/images/logo-webglearth-white-100.png downloads the png correctly and it did.
Then I launched the page and I still got the issue.
How can I fix it?

sns/matplotlib clustermap/heatmap generates weird notches in individual cells

I am creating a heatmap using sns.clustermap and getting following type of notches when saved using savefig. Has anybody seen this kind of errors?
I tried both option: saving to pdf file with rasterized=True and saving directly to png.
With dpi=300, I still get notches:

AssertionError: labels.txt and cfg/yolov2.cfg indicate inconsistent class numbers

enter image description here
I had already modify label.txt & tiny-yolo.cfg
but it still show up
AssertionError: labels.txt and cfg/yolov2.cfg indicate inconsistent class numbers
First i see you have tiny-yolo.cfg and yolov2.cfg, it looks like you have modified tiny-yolo.cfg but your code is running the old file yolov2.cfg.
You usually get this error when trying to train a model but your labels.txt and cfg are not compatible. Download new, or edit a new copy of the cfg file and try again. remember to leave the original in the same folder.

Google Drive - use WebViewLink vs thumbnailLink

I'm using the Google Drive API where I can gain access to 2 pieces of data that I need to display a jpg file oin my program. WebViewLink is the "large" size image while thumbnailLink is the "thumb" smaller size of the same image.
I'm having an issue with downloading the WebViewLink that I do not have with the thumbnailLink. Part of my code calls either exif_imagetype($filename) or getimagesize($filename) so I can retrieve the type, height & width etc for the $filename. This is successful for the thumbnailView but not the WebViewLink...
code snippet...
$WebViewLink = "https://drive.google.com/a/treering.com/file/d/blablabla";
$type = exif_imagetype($WebViewLink);
--- results in the error
"PHP Warning: exif_imagetype(): stream does not support seeking..."
where as...
$thumbnailLink = "https://lh6.googleusercontent.com/blablabla";
$type = exif_imagetype($thumbnailLink);
--- successful
where $type = 2 // a .jpg file
Not sure what I need to do to gain a usable WebViewLink... maybe use the "export" function to copy to a file on my server that is accessible, then use that exported file for the functions that fail above?
Thanks for any help.
John
I think you are using the wrong property to get the image of the file.
WebViewLink
A link for opening the file in a relevant Google editor or viewer in a browser.
thumbnailLink
A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours.
You can try using the iconLink():
A static, unauthenticated link to the file's icon.
Sample image of thumbnailLink:
Sample image of a iconLink:
It will still show relevant image about the file.
Hope it helps!

FPDF Fatal Error

I am trying to test implementation of FPDF. Below is the code I'm testing with, but it keeps giving me the error: "Fatal error: Class 'FPDF' not found in /home4/fwall/public_html/create-press-release.php on line 5". That is the URL to the page I am calling the below code on.
I have verified that the php file for FPDF is being required from the right spot, and it's still happening. Can anyone figure out what's going on?
require(__DIR__.'/fpdf.php'); //The fpdf folder is in my root directory.
//create a FPDF object
$pdf=new FPDF();
//set document properties
$pdf->SetAuthor('Lana Kovacevic');
$pdf->SetTitle('FPDF tutorial');
//set font for the entire document
$pdf->SetFont('Helvetica','B',20);
$pdf->SetTextColor(50,60,100);
//set up a page
$pdf->AddPage('P');
$pdf->SetDisplayMode(real,'default');
//insert an image and make it a link
//$pdf->Image('logo.png',10,20,33,0,' ','http://www.fpdf.org/');
//display the title with a border around it
$pdf->SetXY(50,20);
$pdf->SetDrawColor(50,60,100);
$pdf->Cell(100,10,'FPDF Tutorial',1,0,'C',0);
//Set x and y position for the main text, reduce font size and write content
$pdf->SetXY (10,50);
$pdf->SetFontSize(10);
$pdf->Write(5,'Congratulations! You have generated a PDF.');
//Output the document
$pdf->Output('example1.pdf','I');
This line:
require('http://siteurlredacted.com/fpdf/fpdf.php');
probably won't do what you expect. The request will make the remote server "execute" fpdf.php, returning a blank page, and your script will include an empty file. That is why it doesn't find any class to load.
You should download FPDF and put the file on your filesystem, where it is accesible to your script with no HTTP requests. You can try putting fpdf.php inside your project.
Hope this helps.