- mac/linux terminal zsh
- zenity installed
- conda env microptyhon (with all necessary scripts epstools etc.)
- folder with firmware im bin format
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
#!/bin/bash | |
# id of expo go app / change if you use dev-client | |
APP_NAME="host.exp.Exponent" | |
# get data folder from app container | |
FILE_LOCATION=$(xcrun simctl get_app_container booted "$APP_NAME" data) | |
# open path in finder | |
open "$FILE_LOCATION" |
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
// 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; |
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
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); | |
}); | |
} |
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
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'] |
open shortcut master list
⌘k + s
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
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 = { |
NewerOlder