Requires PiKVM OS version 2022.06.20 or newer.
-
Install ZeroTier, then start and stop it to generate an identity
| """ | |
| An example implementation of a formula evaluator written on top of Python's AST package. | |
| See https://blog.oyam.dev/python-formulas/ | |
| Usage: | |
| >>> evaluate_formula("a + b", {"a": 1, "b": 2}) | |
| 3 | |
| """ |
This is a simple sample script for achieving the resumable upload to Google Drive using Node.js. In order to achieve the resumable upload, at first, it is required to retrieve the location, which is the endpoint of upload. The location is included in the response headers. After the location was retrieved, the file can be uploaded to the location URL.
In this sample, a PNG file is uploaded with the resumable upload using a single chunk.
Before you use this, please set the variables.
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Wrapping arbitrary text to a defined box is not supported at least up to | |
| Matplotlib 3.1. This is because the wrap width is hardwired to the Figure box. | |
| A way around this is to override the _get_wrap_line_width method, either with | |
| a new function, or by subclassing the matplotlib.text.Text class. Both | |
| methods are shown below. |
At October 11, 2019, I published a Javascript library to to run the resumable upload for Google Drive. When this is used, the large file can be uploaded. You can also use this js library.
This is a sample script for uploading files to Google Drive using Javascript. The files are uploaded by Drive API v3. gapi.client.drive.files.create() can create an empty file on Google Drive. But it cannot directly upload files including contents. I think that this might not be able to upload files and metadata with the multipart/related, although this might be resolved by the future update. So now, as one of workarounds, I use using XMLHttpRequest.
| // upload.js, from https://github.com/googledrive/cors-upload-sample | |
| // Contributors Steve Bazyl, Mike Procopio, Jeffrey Posnick, Renaud Sauvain | |
| // License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Implements Resumable Upload for Google Drive as described by | |
| // https://developers.google.com/drive/v3/web/resumable-upload | |
| // | |
| // Modified by Paul Brewer, Economic and Financial Technology Consulting LLC | |
| // Nov. 1 2017 | |
| // 1. use Google Drive API V3 instead of V2 |