How to repair ipnyb files? - jupyter-notebook

I accidentally delete jupyter file in VScode and I recover it using a disk drill but now I can not open it. even the code is changed into characters.
Please help me out.
picture of a file after recovery

Related

Rstudio force Mac to download from iCloud

My Mac laptop is set up to upload large data files to iCloud, leave a name stub and delete from my local hard drive. This is not necessarily a bad thing. When I go to the directory and click the name stub, the file starts downloading. But when I try to read in one of these files in an R script, Rstudio (and presumably R, although I haven't tried that) just says that the file is missing.
How can I tell RStudio to force the mac to download the file?

IPython Notebook - Is it safe to delete temporary files and folders?

IPython Notebook has been opening lots of temporary folders, including those ending with .ipynb[some random chars] and folders with checkpoints.
I guess some of them were created when my compyter crashed or all sort of things happened. I would have assumed those files would clean themselves once everything is normally saved, but they don't. They keep being there, trashing my workspace.
Is it safe to delete those files and folders, once I've saved my original .ipynb file?
Thanks
It works like any other checkpoint-systems. They are always safe to delete, but you never know when you will need them, which is why they are created.
An interesting question could be how you can disable the whole checkpoint system.
It is safe to delete those files(.ipynb_checkpoints) after saving your progress to the main file
This files are there as a backup but you can delete it if it is cluttering your workspace

Reading a file though a link

I have a directory where I keep all my .csv files. I have created a shortcut for this directory. Now, I want to read those csv's through this shortcut.
read.csv("<shortcut to directory>/input.csv");
Above command doesn't work. Complains about "Unable to create the connection"
Can anyone help me in this?
If you're using Windows, note that the shortcuts you create within Explorer are not part of the filesystem: they're just an Explorer-specific trick. When you double-click on the shortcut, Explorer knows to open the location it points to, but other applications won't know what to do with them.
Windows does have symbolic links a la Unix, but by default you have to create them from the command prompt, with the mklink command. See Wikipedia for more info.

Visual Studio files turning to gibberish

So, We pull solutions from TFS. The solution files on TFS are fine. However, when I edit them on my computer sometimes the code will turn to gibberish (particularly, I'll edit them, save them, close them, and open them later when this happens). It's happened with both .NET files and classic ASP files. When I go "Save As" it says is a binary file. Does anybody know how to prevent this? I'm tired of losing work.
Your problem is the encoding of the file that you or member of your team save the file with.
The encoding should be matched and better to be UTF - unicode.
Stand on some file -> goto file-> save as -> on the save button you'll have a little black triangle on the side -> press it -> you'll see with which encoding you are saving the files.
Make sure that all the members of the team set the defaults of saving to the unicode encoding.

Forgot to backup my database before reinstalling WAMP

I uninstalled and reinstalled my WAMP earlier today. I backed up my /www directory but totally forgot about my database (phpmyadmin). I didn't delete my C:/wamp directory, i just reinstalled on top of it.
Does this mean my databases are gone forever? Is there a way to retrieve them? Next time i'll know to export a dump of my databases before I meddle with the installation, I guess I had to learn this the hard way...
Thanks for your help.
That depends if you deleted the data directory or not. By default, wamp's data directory is c:/wamp/bin/mysql/mysql5.x.x/data check there and see if you have some folders with the names of your old databases. In those folders there would be a bunch of .frm, .MYD, and .MYI files assuming you are using myisam. If those files exist then you can recover. Just make sure the datadir in my.ini is pointing to the directory where your database are and restart mysql. It should fix itself automatically.
If you use innodb tables then it's a little more complicated but can be done. Those would be stored in files named ibdata1, ibdata2, etc.
If you don't have any of those files then I'm afraid you're out of luck.
I was able to retrieve mine on windows 7 by doing the following
Open Computer by clicking the Start button , and then clicking Computer.
Navigate to the folder that used to contain the file or folder c:/wamp/bin/mysql/mysql5.x.x/data
Copied it just in case I needed to revert
Right-click it, and then click Restore previous versions. ...
Double-click a previous version of the folder that contains the file or folder you want to restore.

Resources