Skip to content

Instantly share code, notes, and snippets.

View dmmfll's full-sized avatar

Don Morehouse dmmfll

  • Fort Lauderdale, Florida
View GitHub Profile
@disarticulate
disarticulate / angularjs_notebook.ipynb
Last active March 31, 2022 07:16
A notebook demonstrating how to use arbitrary frameworks (ie, AngularJS) within Jupyter Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
//Imperative:
//Too many if-else and null checks; relying on global indexURLs; decided that "en" urls are default for any country
const getUrlForUser = (user) => {
if (user == null) { //not logged in
return indexURLs['en']; //return default page
}
if (user.prefs.languages.primary && user.prefs.languages.primary != 'undefined') {
if (indexURLs[user.prefs.languages.primary]) {//if translation exists,
return indexURLs[user.prefs.languages.primary];
} else {