How to make each CSV column different color - sublimetext

How do I make coordinate system look so colorful?

This effect is done via a plugin, appropriately called rainbow_csv. It can be installed using Package Control.

Related

Isolate OpenSCAD view

I occasionally do some work in OpenSCAD on Fiverr. Instead of sending 100 screenshots each day I would like to provide my clients with a live 3D preview of the object. But I need to do this without giving the source away (in the past I have been naive enough to get scammed this way).
I want my clients to be able look at the live 3D view without being able to see the source code.
For example, the following is a possible solution I was thinking of: hardcode the contents of the .scad file into a string inside an executable. Then start OpenSCAD with this string but only show the preview window, without the client being to look at the code.
You can, in fact, use the openscad.exe to generate a preview from a .scad file:
& "C:\Program Files\OpenSCAD\openscad.exe" --preview --camera=0,0,0,45,45,0,200 test.scad -o test.png
However, there are two problems with this method. 1. It only generates a PNG, I need my clients to be able to pan and zoom. 2. It needs a local file. I could generate a tmp file, open it with above command and then quickly delete the file.
Consider sending an STL file for them to look at. OpenSCAD can export to STL. There are two versions of STL: ascii and binary. OpenSCAD outputs the binary form. Your clients could view your STL file in something like viewstl.com.
Since they could 3d print from the STL you might consider adding some watermark type textures or features that would be difficult to remove. Another option would be to change some key dimensions enough to make it unusable but not so much that it looks bad.

Mapbox GL JS - remove cluster effect on mbtiles

I am currently working with a large file of points that I want to filter according to properties and bounding box.
When I add this layer to my map using a geojson file, I can manage the cluster effect using property as mentioned in documentation but the file is quite large to load in the browser.
So I think it is better to go through a mbtiles file. I use tippecanoe for the conversion goejson to mbtiles
But, when I add this mbtiles file as a source there is a cluster-effect that I want to remove.
I am just asking how to remove the cluster-effect using mbtiles? Is it possible?
I cannot find this in the API documentation, but it's possible I missed it somehow.
Section
Dropping a fixed fraction of features by zoom level
says that default drop rate is 2.5, set it to 1 before generating mbtiles.
--drop-rate=1

Cropping SVG to range in Inkscape?

Say I have a range – something like a 400x400 rectangle at 60, 60 – which is dynamically generated by a separate program. I'm wondering how it's possible to crop my document to that range in the command line?
Everything I've read has suggested I'd need to add a rectangle to the document, resize the document to that rectangle (resize to selection), and then remove the rectangle.
But I'm having trouble with adding and removing that rectangle. I found the ToolRect verb, but I can't seem to find anything related to actually drawing that rectangle (or removing it).
So, am I doing this wrong or is there just no way to add (and select) the rectangle using only the command line? Using another program is also fine, but I haven't had much luck with that (I couldn't get the python modules installed for the only possibly helpful thing I found..).
In this email discussion from 2012, someone said:
There is no way to pass parameters to verbs (with the current
implementation, they don't take parameters by design).
In case they add this capability later, the required verbs to crop the page would be:
EditSelectAll
SelectionGroup
ToolRect (requires parameters, i.e. where to crop)
EditSelectAll
ObjectSetClipPath
FitCanvasToDrawing
FileVacuum
FileSaveAs (requires a parameter, so that we don't have to overwrite the original)
Since Inkscape can edit any valid SVG, I'd rather look into other available SVG libraries, like this one for Python.
If you are OK with rasterising your image, take a look at this question. Inkscape unfortunately ignores the --export-area option when exporting to svg or pdf.
My – admittedly, unsatisfying – solution was to create a separate program to add a viewbox to the SVG text.
The program I made was implemented into a separate part of my project, so I don't have a good command line version, but if you plan on making one yourself, whatever XML editing library you have for your language of choice should be all you need. I used xmldom for Node.js with relative ease.

Export image of the plot by code - Netlogo

how can I export an image of the area of the plot by code?
I'm using Netlogo 5.0.5.
I'm tring to reproduce the comand "copy image" of menu right-button of the mouse in the area-plot in tag "Interface".
There is no primitive to export a plot as an image in NetLogo, which is admittedly a hole in the language. It would be fairly simple to write an extension to do that, but as far as I know, none exists.
That leaves you with two alternatives:
Use export-plot, which will give you a CSV file, and recreate your plot using some other tool (e.g., Gnuplot). This is more work, but it has the advantage of giving you better quality output in the end, NetLogo plots being kind of bitmappy anyway...
Use export-interface to export the whole NetLogo interface tab as an image, and then crop the resulting picture to keep only your plot. If you use a command-line tool like ImageMagick, this can be fully automated.
In both cases, you could try calling the external program that you choose directly from NetLogo by using the Shell extension.

Automatic selection of control points in Matlab

Is there a way to select the control points automatically in Matlab instead of manually selecting them by cpselect? Thank you very much.
I just recently worked on a project where I had to do the same thing -- eventually I found that you can select control points automatically, but only if you use automatic selection to find the control points for both the unregistered and the orthophoto. (The control points used to define image transforms are stored in matrices, so if you can get your automated system to output a set of point coordinates in matrix form you can pass them to straight to cp2tform and bypass cpselect entirely.) On the other hand, cpselect stores corresponding pairs of image points using some kind of special data structure, so that I was never able to just pass it a set of control points for one image while leaving the other image blank.
I don't have the Matlab Image Processing Toolbox, but I see from the documentation that cpeselect can be called with an argument specifying the initial set of control points. Can you reduce your task to automating the creation of that initial set?

Resources