Streamit multipage app saving script with emoji - streamlit

I'm sure this is simple but i'm stuck.
Been able to develope an app following:
https://blog.streamlit.io/introducing-multipage-apps/
Except for being able to save the pages with an emoji for instance '01_🎈_main_page.py'
When I try i get:
Can someone please advise?
Thanks!

I had a similar issue when I was saving my script to a shared drive in my workplace. I think it was a setting in the shared drive that did not permit emojis in filenames. When I moved the script to the local hard drive the problem resolved (though I think the implementation of emojis within the filename is distinctly suboptimal).

Related

Rstudio cloud. Download a project

Since Rstudio cloud is no longer free, I'd like to download my projects from it. I found a lot of information how to download files from the projects, but I need to download the projects themselves, because I'd like to keep on working on them and be able to use my previous code. Is there any option to reach this, except copying code from every single project as a text?
Thanks in advance for any help

My shinydashboard app works on my machine but not on shinyapps.io

and thanks for any help!
I keep getting the same error message when trying to publish the app on shinyapps.io:
The application failed to start (exited with code 1).
I have already commented the setwd() and library(shiny) as I have learned from other posts, but so far no luck. This is the screenshot of the error.
I am new to this, so any support is greatly appreciated.
It looks to me like you are using an absolute file path in your script. shinyapps.io won't understand a file path specific to your machine.
Instead, try putting the files you need to read in a folder (e.g. 'InputFiles') and put that folder in the same place as your scripts. Change your scripts to refer to files using relative file paths like: 'InputFiles/file1.csv'.
When you run the code locally make sure to set the working directory to the same directory your scripts are in. When you publish to shinyapps.io make sure to include your scripts and the 'InputFiles' directory.
Here's a great explanation of how these work: https://docs.rstudio.com/shinyapps.io/Storage.html#Storage
The solution came to me after reading Thomas's post. I had an R script (which did all the statistics and plots for my dashboard) stored in the same folder where the shiny UI and server were stored. After moving this script file to a different folder, the problem was solved. I do not quite understand why this fixed the issue, but I hope this article helps people facing similar issues.

Possibility of getting offline shinyApp without Publish Button, csv Data and seeing R code?

Hi guys i have made a shinyApp for a client using R.
The client for whom I’m working is asking for a shinyapp that works offline preferably in the form of an application or shiny window (as the online link of shinyapp.io will put load on the server). He wants to get the shiny output without seeing the R code.
He will later handover the shinyApp to his employees (>200) and they will mostly use the offline shinyApp on their desktop (in shiny window). Furthermore the data is very confidential so the client doesn't want his employees to either get csv data or publish the app online or see R code. Because every time they would run the app, they require csv data or codes to generate output.
That's why he doesn’t want a publish button anywhere in the app so that his employees doesn’t publish the app online.
Is there any way to do so? Any suggestions would be much appreciated
Method 1
I feel this is the best way to do it. This will give you an exe setup to install on your clients' server If you find it complicated you can try the below method, but my first preference would be this one.
Method 2
The process of making your standalone app is best explained here.
You can also use this site. If you feel the first is a little ambiguous
It is very much possible, and I do it often. If you have any doubts, you can ask me. This will not show the code to your client, it will be like any other desktop/server app, although the code can be seen if the app is probed, unlike the first method.
You can put the packaged app in a server which serves the local IPs.
I think you can do it without any hassle. Just follow the instructions line by line.
Regards/Revanth Nemani

How to get the directory information in the workspace of Light Table?

Opening recent workspace shows the directories and files that I opened before, then how to get the directory location of them? I tried right click, but I see no information.
I expect something like this from Code Runner.
[I'm a member of the open source Light Table team.]
Light Table doesn't provide that info as you expect.
I agree that that would be a really useful feature, especially when you have multiple directories with the same name in different paths.
Maybe a tooltip when you hover over a directory that shows the full path would be the minimal change that would be helpful.
If you're willing to contribute, or know someone that is, feel free to create new issues in the GitHub repo for each of the Code Runner features you'd like to be implemented. Otherwise, add them to the feature wishlist wiki page.
These features could be implemented as plugins but I think some of them might arguably be fine implemented in the core app code. Pull requests welcome!

How to be sure about an uploaded file is not a virus in ASP.net?

I saw this question:
ASP.NET File Upload: how can I make sure that an uploaded file is really a JPEG?
and similar questions about being sure of the file being uploaded through asp:FileUpload control in ASP.net is really image. But What If users upload virus-infected images? How can I be insured of the image files being uploaded via my ASP.net application does not affect the files in my web app folder and/or images uploaded by other users?
As long as you don't serve it back to anyone as anything other than an image (content-type) and never trying to execute (.exe) the file you'll be fine.
Most anti-virus software run whats known as an "on-access scan". That is, when a file is changed, it automatically scans that file.
So save that file to the file system and let your server's anti-virus software do the work for you.
I'll take what is likely a somewhat controversial position.
There is no way to know with 100% certainty what the intent of a file is, be it good or evil. It is impossible. AV scanners give you a slice of data but they can't give you 100% guarantees either. No one can.
Given this reality, you need to build your app assuming that all files uploaded are bad. Yes, scanning is still fine and will filter out a bunch of stuff. But it will never be 100%. Is it 99.999% or 20%? Who knows. Does it really matter?
I would build any app today assuming that all user supplied content is bad. Very bad. Hostile bad. Because eventually it will be if you make it. And when it is, you'll be ready for them...rather than all the people that have to rearchitect their app because they made bad assumptions early on.
With a bit more data about your exact concerns, I'd be happy to comment on them more specifically...
As a side note, In older version of IIS (6 or prior versions) It could be possible to change FileName to the real malicious file name after save the file with original filename. Which has possibility to be read and execute regularly by the server.
E.G. set the file name like: file.asp;.jpg or file.asp%00.jpg etc...
It also has a possibility to change target directory by manipulation of file name. Which is extremely dangerous
E.G. newfolder.asp::$Index_Allocation or etc...
There is also some new way of attacks. Read more here.

Resources