some usefull command for git
git add <file> or git add .
git commit --amend
# without message
git commit --amend --no-edit| const { Storage } = require('@google-cloud/storage'); | |
| const storage = new Storage({ | |
| keyFilename: '<file_path>', | |
| projectId: '<projectId>', | |
| }); | |
| async function generateSignedUrl() { | |
| // These options will allow temporary write access to the file | |
| const options = { |
open shortcut master list
⌘k + s
| def infer_df(df, hard_mode=False, float_to_int=False, mf=None): | |
| ret = {} | |
| # ToDo: How much does auto convertion cost | |
| # set multiplication factor | |
| mf = 1 if hard_mode else 0.5 | |
| # set supported datatyp | |
| integers = ['int8', 'int16', 'int32', 'int64'] | |
| floats = ['float16', 'float32', 'float64'] |
| const app = require('express')(); | |
| async function start() { | |
| return new Promise((resolve, reject) => { | |
| // The `listen` method launches a web server. | |
| const server = app.listen(); | |
| server.once('listening', resolve(server)).once('error', reject); | |
| }); | |
| } |
| // More Information on Base64 | |
| // http://www.sunshine2k.de/articles/coding/base64/understanding_base64.html | |
| // https://gist.github.com/Nijikokun/5192472 | |
| // https://developer.mozilla.org/en-US/docs/Glossary/Base64#solution_2_%E2%80%93_rewriting_atob_and_btoa_using_typedarrays_and_utf-8 | |
| // convert string to UInt8Array | |
| const enc = new TextEncoder().encode('ääüß'); | |
| // calculate filling bytes | |
| const emtpy = enc.length % 3 > 0 ? 3 - (enc.length % 3) : 0; |