Is there any way I can run python in github pages? Specifically through Pyodide because I am using pandas. I know github pages is only meant to serve static pages using HTML/CSS/JS but I was wondering if there is a workaround with pyodide given that it is compiled in Javascript.
I am trying to build a small web application which has a username entry box that once submitted, calls some data from an API, processes in pandas and displays some visualizations (either using a JS library like Chart.js or Zingcharts, or otherwise matplotlib / seaborn)
WebAssembly is run client side, so you can make a Pyodide application hosted on Github Pages (or any other hosting for static assets).
For downloading Pyodide packages/dependencies, the easiest is to use the JsDelivr CDN (cf pyodide docs), but you can also host them on Github pages if you prefer. The corresponding asset size should be within allowed usage limits.
Related
I'm making a chat widget, which will be embeddable to any website using an iframe. Previously I made a react app and then bundled everything to ONE bundle.js file and hosted it on S3(or any static file hosting platform) with public access and then inject that file inside the website with iframe (using the script tag). That bundle.js file has a size of nearly 1.23 MBs. I suspect that it can affect the speed of the website loading.
I have tried one more thing, I created the same react app and deployed it on AWS Amplify, and then use the link of that app in the iframe instead of hosting a static bundle.js file.
Is the latter one a good approach or the former (bundle.js) was better?
I figured it out that the latter approach (Running the app in AWS Amplify) takes more time to load hence is not that useful than hosting a static file on S3. However, I found that CloudFront can improve the speed and also add cache support for it.
We have an application that uses VueJs and D3. The requirement for our users is that they wont have internet connection, so they can only accept a html file or a bunch of files(zipped folder).
My first question is if we go ahead with Vue, can we use html-webpack-plugin to bundle everything into a single html file?
My second question is: When I google bundling into a single html, Progressive Web Apps show up in search results. Are PWA's web applications that you can just open an html and it works or Or is PWA more about how to handle a webapp when it does not have access to network?
Thanks!
I have a requirement where I need to migrate a website into an Apache Cordova app with minimal effort. I also need to add an extra feature that is not doable without native permissions.
The existing website contains enormous JSP content. As given here, I cannot use JSP files with Cordova. So, I'm thinking of loading (redirecting to) that website into the app. For the extra feature, I would need a two way communication between the website & the app.
I have done that previously between a native app and locally embedded HTML pages. But since the website is not locally hosted, Is the communication still possible ?
Is there a way to hold a large block of text, or images/videos, embedded in a FirefoxOS app, while directly accessing them from the app (similar to /res/raw/ in Android)? I don't see where the /data/ directory is being accessed in the example app.
There are many ways that you can do this:
Distribute your web app as a packaged app. In this scenario all your resource files are zipped up in a single file, available after install via a URL scheme described in the documentation.
The Application Cache allows you to instruct the browser to download files for offline use. I like Rob Hawkes' utility for generating appcache manifest files.
You can manage the data yourself by downloading the files via XMLHttpRequest and storing the data in an IndexedDB database or on the SD card via the DeviceStorage API.
I think that your best bet is the filehandle API, but more importantly keep in mind that a Firefox OS app is basically a website so you shouldn't be thinking as an android app that can carry it's media and so on.
Good luck
If you want to display images in a website you place images in the same root folder or sub folder. The same thing works with firefox OS.Place your images in your app folder and use them. If you want to use images from the mobile then you can use device Storage API .you can find the example here
I have a Phonegap iOS app. My app is distributed privately, hence there is and there will be no usage of the app store. The app communicates with a homebrew middleware. In order to manage the app updates, I thought about doing something like:
-> On app start, check if a more recent version is available.
-> If yes then call a home-made Javascript module that will leverage the HTML5 file I/O API in order to update/create/delete files based on the output of the middleware.
In your opinion; is this solution reliable?
Are there any alternatives? (app store is completely out of the picture)
With a PhoneGap/Cordova app you normally load files from your local www folder. The problem with updating files at runtime is that you cannot write to the www location - you can only write to your app's 'documents' folder.
I assume you are using an Enterprise distribution since you are distributing without the app store. You could look at using something like TestFlight to distribute updates if you are happy for the users to have to go and check for updates.
You could also eliminate TestFlight and host the ipa files yourself, check for updates and then ask the user to download and install the update.
EDIT
It is not possible to write to the www folder with or without a plugin. This is due to iOS restrictions rather than PhoneGap/Cordova restrictions.
These links talk about distributing Enterprise apps over-the-air
http://developer.apple.com/library/ios/#featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html
IOS Enterprise Distribution Through OTA
Enterprise In-House App distribution
I was considering using the www folder as a bootstrap to download the actual app in a www folder in the document directory, and loading the index.html page from there (and the rest of the app)
I'm wondering if that would be an option
Of course the ObjectiveC UIWebView would point to the downloaded version if it exists
I know this is an old question, but the accepted answer is no longer correct. Here's a complete project showing how it can be done: https://github.com/ben-ng/phonegap-air
In short, the trick is to not write to the app bundle, but to the Documents directory.
There's an alternate service called Trigger.io. It is a lot like phonegap, but one of its' key features is that it lets you "reload" the app on the device, which is essentially what you're looking for, AFAICT.
So it seems that cordava can only load files that are in the app bundle. You cannot simply alter the webroot parameter to take the documents folder.
What you could do is use the FileReader API to read from the persistent store. This would mean you would have to create some sort of bootstrap html / javascript that is in the app bundle and create code that loads the content from the persistent store (which you can update yourself anytime you like)
This is a great place to start looking: Cordava File API docs