Error trying to connect to a droplet in analogsea - r

The initial attempt was to use analogsea to create a droplet using do_provision, but it seems that the problem is that I just can't seem to get ssh working. I'm not sure if something is wrong with my DO account or something is wrong with my computer, but it definitely seems like everything in the manuals indicates it will be easy, and it just isn't working no matter what I try. I keep getting the error:
Error: Authentication with ssh server failed
Now, I've tried multiple keys, I've tried using all keys on my account. I've tried deleting down to one key and using that. I even tried on another computer. So I'm just not sure what else to try, and given the nature of the problem, I'm not sure how to give you something reproducible either.
library(analogsea)
library(plumber)
Sys.setenv(DO_PAT = myauthentication)
mydrop <- do_provision(name = "MyTestDroplet", region = "nyc3")

So what I didn't know as primarily an R programmer and not a web developer was that the analogsea package requires that you have all of your keys in the ~/.ssh folder (which, on Windows, R likes to make your My Documents folder your ~, which doesn't quite make sense to me since it's more analogous to c:\Users\username, but anyway... You need to set up your ssh keys and put them in .ssh. However, I don't really recommend using the plumber setup for your DO server, because it doesn't really work very well, it won't get you where you want to go, and ultimately, you're going to just be confused. So instead, you should really consider using the analogsea package and follow some of the relatively good (albeit somewhat confusing) advice elsewhere.

Related

How can I create a user library for R on Windows 10?

I want to follow the advice I've read and heard to have both a main library in R_HOME/library and a user library. I'm using W10 on a desktop machine (not important, except that it gives me a name by which to refer to it), and I can't make R use the user library.
I have succeeded in doing that on a W10 laptop: C:/R/R-4.0.2/library contains some 30 recommended packages, and C:/Users/[username]/Documents/R/win-library/4.0 con contains a much larger number of packages in my user library.
As I recall, and as I wrote down when I did an upgrade on a server, all you have to do to create a site-library is to create a directory called C:/R/R-4.0.2/site-library, and R will use that the next time it starts.
To create a user library, create the directory C:/Users/[username]/Documents/R/win-library/4.0.
That seemed to work on my laptop, for I have seemingly a working R library and a user library there.
That seemed to work on the server, too: I have a library and a site-library.
In both cases, .libPaths() shows the same libraries that I see with Dired on the disk.
I tried to do the same thing on the desktop machine, and i can't make it work.
I created a directory C:/Users/[username]/Documents/R/win-library/4.0, restarted R, and ran .libPaths(); the only directory that was listed was C:/R/R-4.0.2/library.
Because I thought the Documents in that path seemed odd, I tried it again using C:/Users/[username]/R/win-library/4.0, still with no success.
https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Managing-libraries seems pertinent, but I'm not sure how to interpret the output of Sys.getenv("R_LIBL_USER). I get "\\[toplevel]\[nextlevel]\Home$\[username]/R/win-library/4.0", which I presume is a long-winded way to get to /Home$/[username]/R/win-library/4.0 (aka C:/Users/[username]/R/win-library/4.0.
Suggestions? I've tried a number of other suggestions from SO, all to no avail.

Is there a quick way to debug an external meteor package?

You just installed a meteor package, and for some reason it isn't working. You suspect that it's the package itself that has a bug. You want to investigate that. How do you do that?
Optimally, you'd be able to run a command that forks the original package repository with the right version and replaces the original in your meteor application, ready for you to debug it and, once fixed, possibly generate a pull request.
I don't expect something like this to exist as a single command, but is there a workflow that you follow to do exactly that? Or do you approach the problem in a different way?
Do a git clone of the package into your local packages folder. Fix any bugs you need to. Commit them. And make a pull request. Once the pull request is accepted, you can remove the local package and use the regular package.
From when I've asked in the past, there isn't really an easier way to do this it seems. But to be honest, this approach isn't too much work.
Also, if you just want to debug, you can step through the package code while it's running without cloning the repo locally. (Assuming it's running in development mode and hasn't been minified by Meteor).

Using TingoDB within a Meteor application in development and production mode

I am trying to use TingoDB instead of MongoDB in a Meteor application I wrote for easier deployment.
I have been looking at the answer given here Meteor without mongo
However, this isn't proving to be so easy. For one thing, I would very much like to try and use (and debug) TingoDB in my development environment, not a bundled "production" environment. Hopefully when I bundle it for production the new "mongo-livedata.js" would be included too.
My biggest issue so far is that I have NO idea (and I've tried tracing and poking around Meteor) where the devil Meteor is getting the "correct" mongo-livedata.js package. I am hoping to be able to somehow "override" said package so I can "hack" away on it in safety and only for the single application I need it for. So far where Meteor is loading this for development has eluded me greatly. Let alone how I can, for this application, safely override it.
This is Meteor 1.1.02 -- the platform I am developing on is Mac OS X but I don't think that makes too much of a difference.
TIA!
Update: Using demeteorizer found the file in question now (mongo.js) and the similar code. However, changing over to TingoDB has now made the application non-reactive to data changes, rather the reason I was using Meteor in the first place. No idea why it's no longer reactive. :(

Automatically log changes to system files and allow revert

I'm trying to learn about the guts of Unix right now, mostly through experimentation. When I was first starting, I found myself looking through forum posts, copying and pasting bash code. When I broke something, I often had to do a fresh install because I couldn't remember what exactly I had changed where. Now, the simple solution is to record a log of all the system files I've changed and keep original copies of all the default files so I can revert if necessary. It would be great if there was a cl tool which did this for me automatically. It would be even greater if I could step back through changes. Basically, I'm looking to version control my entire OS.
Does anything like this exist? I would also accept alternative strategies for spelunking through Unix without causing permanent damage if you think I'm going about this wrong.
Using debian if it matters.

Couple of basic questions about Julia on Windows

I run Julia on Windows with the julia.bat file given in the zip archive. I have a couple of basic questions. This launches a DOS console.
When typing a plot() command Julia returns plot not defined. How to use the plot() function ? Is there a graphical interface available ?
When typing help I get:
What does it mean ?
There is also the launch-julia-webserver.bat file in the zip archive. When running this file two DOS windows open but nothing else happens. What can we do with this file and how ?
By the way I do not find any documentation answering such basic questions... of course if you know where to find such a documentation it would be an ideal answer.
To answer your immediate question, help is implemented as a function, and functions must be called with parentheses. Try help(), or to get help for a particular function in the standard library supply it as an argument; i.e., help(help).
When you enter a function name without the parentheses, the default is to print all of the implementations with their argument types.
The main Julia documentation is available online at http://docs.julialang.org/. We also have a mailing list at https://groups.google.com/forum/#!forum/julia-dev.
The webserver is pretty rough, especially on Windows. You should be able to open up http://localhost:2000/ with it running and access a web-based command environment. But you'll probably just want to stick to the normal command line.
Another contributor highlighted the response to help as a potential issue for new users and we've opened a bug on it at https://github.com/JuliaLang/julia/issues/1320. It's a new language and there's still plenty of rough edges, so thanks for helping us file those down!
To use launch-julia-webserver.bat, after you double-click it and the two DOS windows open, one of them should say "Connect to http://localhost:2000/ for the web REPL". If you open a web browser to http://localhost:2000/, you should be greeted with a welcome page that asks for your name and a session name.

Resources