I hereby claim:
- I am rayh on github.
- I am rayh (https://keybase.io/rayh) on keybase.
- I have a public key whose fingerprint is D532 D25D 30DF 75EF 6CD9 252B A27C 7177 CBBE A264
To claim this, I am signing this object:
| // To add observation | |
| self.label1Binding = [self.model addObserverForKeyPath:@"exampleValue1" block:^(NSDictionary *change) { | |
| label1.text = [NSString stringWithFormat:@"%d", self.model.exampleValue1]; | |
| }]; | |
| // To remove observation | |
| self.label1Binding = nil; |
I hereby claim:
To claim this, I am signing this object:
| func appController(appController: TVApplicationController, evaluateAppJavaScriptInContext jsContext: JSContext) { | |
| jsContext.evaluateScript("var console = {log: function() { var message = ''; for(var i = 0; i < arguments.length; i++) { message += arguments[i] + ' ' }; console.print(message) } };") | |
| let logFunction: @convention(block) (NSString!) -> Void = { (message:NSString!) in | |
| print("JS: \(message)") | |
| } | |
| jsContext.objectForKeyedSubscript("console").setObject(unsafeBitCast(logFunction, AnyObject.self), forKeyedSubscript:"print") | |
| } |
| var SimplePage = function(url) { | |
| var self = this; | |
| function onSelect(event) { | |
| var ele = event.target | |
| var href = ele.getAttribute("href") | |
| if(href) { | |
| new SimplePage(href).load(); | |
| } |
| App.onLaunch = function(options) { | |
| new SimplePage('http://mytvservice.com/home.xml').load(); | |
| } |
| var fs = require('fs'); | |
| var Q = require('q'); | |
| var spawn = require('child_process').spawn; | |
| var path = require('path'); | |
| // Make sure you append the path with the lambda deployment path, so you can | |
| // execute your own binaries in, say, bin/ | |
| process.env["PATH"] = process.env["PATH"] + ":" + process.env["LAMBDA_TASK_ROOT"] + '/bin/'; | |
| function spawnCmd(cmd, args, opts) { |
| let myTable = MLDataTable(...) | |
| // Fetch the price column (and all it's values) | |
| let priceColumn = myTable["price"] | |
| // Create a new column that contains values that are the result of | |
| // price * bedroom for each row | |
| let priceTimesBedroomsColumn = myTable["price"] * myTable["bedrooms"] | |
| // Remove rows that contain less that 2 bedrooms |
| import kozai.compute as kc | |
| cluster = kc.create_dask_cluster() | |
| dask_client = cluster.client() | |
| print(dask_client) | |
| import dask.bag as db | |
| import numpy as np | |
| from dask.distributed import Client, progress |
| # Import the Kozai Python library | |
| import kozai.compute as kc | |
| # Create a new cluster | |
| cluster = kc.create_dask_cluster() | |
| # Fetch the dask client | |
| dask_client = cluster.client() | |
| # Do some dask work |