Configure bokeh plot to have responsive size
p.sizing_mode = "scale_both"
References
https://docs.bokeh.org/en/latest/docs/user_guide/layout.html#sizing-mode
Daily Notes of a Programmer
p.sizing_mode = "scale_both"
References
https://docs.bokeh.org/en/latest/docs/user_guide/layout.html#sizing-mode
Embedding a single plot at a time with output_file()
<iframe src="/assets/img/Bokeh/flowers.html" sandbox="allow-same-origin allow-scripts" width="100%" height="500" scrolling="no" seamless="seamless" frameborder="0"> </iframe>
References
https://p-mckenzie.github.io/2017/12/01/embedding-bokeh-with-github-pages/
import { Pipe, PipeTransform } from '@angular/core'; import { DomSanitizer} from '@angular/platform-browser'; @Pipe({ name: 'safe' }) export class SafePipe implements PipeTransform { constructor(private sanitizer: DomSanitizer) {} transform(url) { return this.sanitizer.bypassSecurityTrustResourceUrl(url); } }
<iframe width="100%" height="300" [src]="url | safe"></iframe>
from flask import Flask from flask_cors import CORS, cross_origin app = Flask(__name__) cors = CORS(app) app.config['CORS_HEADERS'] = 'Content-Type' @app.route("/") @cross_origin() def helloWorld(): return "Hello, cross-origin-world!"
References
https://stackoverflow.com/questions/25594893/how-to-enable-cors-in-flask
Array distinct formula (requires pressing Ctrl + Shift + Enter)
:
{=INDEX(list,MATCH(0,COUNTIF($D$4:D4,list),0))}
=IFERROR(INDEX($A$2:$A$10, MATCH(0, COUNTIF($B$1:B1, $A$2:$A$10), 0)), "")
References
https://exceljet.net/formula/extract-unique-items-from-a-list
=INDEX(C3:E11,MATCH("Frantz",B3:B11,0),2)
References
https://exceljet.net/index-and-match
MATCH is an Excel function used to locate the position of a lookup value in a row, column, or table. MATCH supports approximate and exact matching, and wildcards (* ?) for partial matches. Often, the INDEX function is combined with MATCH to retrieve the value at the position returned by MATCH.
=MATCH(E2,B3:B11,0)
=MATCH("pq*",B3:B11,0)
=MATCH("peach",B3:B9,0)
References
https://exceljet.net/excel-functions/excel-match-function
The Excel INDEX function returns the value at a given position in a range or array. You can use index to retrieve individual values or entire rows and columns. INDEX is often used with the MATCH function, where MATCH locates and feeds a position to INDEX.
=INDEX(A1:B5,2,2) // returns value in B2 =INDEX(A1:B5,3,1) // returns value in A3
References
https://exceljet.net/excel-functions/excel-index-function
An array formula performs an operation on multiple values instead of a single value. The final result of an array formula can be either one item or an array of items, depending on how the formula is constructed. To work correctly, many array formulas need to be entered with
control + shift + enter
. When you enter a formula this way, you’ll see the formula wrapped in curly braces {} in the formula bar.
{=SUM(LEN(B2:B11))}
References
https://exceljet.net/glossary/array-formula
=SUM($C$4:C4) // D4 =SUM($C$4:C5) // D5 =SUM($C$4:C6) // D6
References
https://exceljet.net/glossary/expanding-reference