SELECT
file.project,
COUNT(*) as total_downloads,
FROM
TABLE_DATE_RANGE(
[the-psf:pypi.downloads],
TIMESTAMP("20160114"),
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @OnlyCurrentDoc Limits the script to only accessing the current spreadsheet. | |
*/ | |
/** | |
* After installing, select a column where the values repeat on each row, for example | |
* a flattened table with dates, invoice numbers, and invoice lines. like this: | |
* | |
* Date |Invoice#| PartNo |Descr .... | |
* 2017-01-15 | 123456 | ACME-WCMCI-1 | ACME WHATCHAMACALLIT 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This script expects the global variables 'refresh_token' and 'firebase_api_key' to be set. 'firebase_api_key' can be found | |
* in the Firebase console under project settings then 'Web API Key'. | |
* 'refresh_token' as to be gathered from watching the network requests to https://securetoken.googleapis.com/v1/token from | |
* your Firebase app, look for the formdata values | |
* | |
* If all the data is found it makes a request to get a new token and sets a 'auth_jwt' environment variable and updates the | |
* global 'refresh_token'. | |
* | |
* Requests that need authentication should have a header with a key of 'Authentication' and value of '{{auth_jwt}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
local opts withvals | |
zmodload zsh/zutil || { <<< 'Requires zsh/zutil module to be available'; false; return } | |
[ -z $commands[docker] ] && { <<< 'Requires Docker'; false; return } | |
zparseopts -D -E -M -a opts -A withvals - \ | |
h=hlp -help=h \ | |
i: -image=i \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple Google Drive backup script with automatic authentication | |
# for Google Colaboratory (Python 3) | |
# Instructions: | |
# 1. Run this cell and authenticate via the link and text box. | |
# 2. Copy the JSON output below this cell into the `mycreds_file_contents` | |
# variable. Authentication will occur automatically from now on. | |
# 3. Create a new folder in Google Drive and copy the ID of this folder | |
# from the URL bar to the `folder_id` variable. | |
# 4. Specify the directory to be backed up in `dir_to_backup`. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kch = CacheService.getDocumentCache(); // set up the cache service as a global object | |
function lp(num){ | |
return ("0000" + num).slice(-2) // elegant | |
Utilities.sleep(500); | |
} | |
/** | |
* A function to left pad an integert with 0 if less than two digits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Extract formula from a cell | |
* | |
* @param {reference} a cell reference from which to extract the formula | |
* @return a string representation of the formula in {reference} | |
* @customfunction | |
*/ | |
function CELLFORMULA(reference) { | |
var ss = SpreadsheetApp; |
I hereby claim:
- I am hlecuanda on github.
- I am hlecuanda (https://keybase.io/hlecuanda) on keybase.
- I have a public key whose fingerprint is B67A 1066 07FB F278 7A74 1F18 8666 B944 3E6B 25DF
To claim this, I am signing this object: