This file contains hidden or 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
let { fileSystemService } = require("./fileSystemService") | |
fileSystemService = new fileSystemService("list.json") | |
const frame = require("ui/frame") | |
exports.onLoaded = (args) => { | |
const page = args.object | |
page.bindingContext = page.navigationContext.model | |
} |
This file contains hidden or 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
<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="onLoaded" navigatedTo="onNavigatedTo" actionBarHidden="true"> | |
<Button id="bOpenPopup" text="Open popup" tap="onOpenPopupTap" /> | |
</Page> |
This file contains hidden or 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 observable = require("data/observable") | |
const frame = require("ui/frame") | |
let data | |
exports.onLoaded = (args) => { | |
const page = args.object | |
const { index } = page.navigationContext | |
data = page.navigationContext.model | |
page.bindingContext = data.profiles.getItem(index) |
This file contains hidden or 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 observable = require("data/observable") | |
exports.onLoaded = (args) => { | |
const page = args.object | |
// basically an observable constructor | |
const user = new observable.fromObject({ | |
name: "Jose Naranjo", | |
year: 1992, | |
month: 11, |
This file contains hidden or 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 observable = require("data/observable") | |
const view = require("ui/core/view") | |
// some isolated observable and listener | |
const user = new observable.Observable() | |
user.set("Name", "Jose") | |
user.on("propertyChange", function (eventData) { | |
console.log(`The user's current name is ${eventData.object.Name}`) | |
}) | |
user.set("Name", "Antonio") |
This file contains hidden or 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
<Page> | |
<TabView androidTabsPosition="bottom"> | |
<TabViewItem title="Go to Page 1"> | |
<StackLayout> | |
<Label text="Welcome to Page 1" /> | |
</StackLayout> | |
</TabViewItem> | |
<TabViewItem title="Go to Page 2"> | |
<Frame defaultPage="views/page2/page2" /> | |
</TabViewItem> |
This file contains hidden or 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
some | |
stop | |
words |
This file contains hidden or 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
# effecitvely cast boolean to integer | |
df3['species'] = df3['species'] * 1 # operating on series overcharges, lambda all over series, True * 1 = 1, False * 1 = 0 | |
df3.head() |
This file contains hidden or 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
sklearn>=0.18.2 | |
nltk>=3.2.3 |
This file contains hidden or 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
import re | |
strings = [ | |
'/i wish this were html and not markdown.md', | |
'/yeah/me/too.md' | |
] | |
for s in strings: | |
print(re.sub(r'\/(.+).md', r'\1.html', s)) | |
# /i wish this were html and not markdown.html |