Posts

Showing posts from 2013

Uber's Michelangelo vs. Netflix's Metaflow

  Uber's Michelangelo vs. Netflix's Metaflow Michelangelo Pain point Without michelangelo, each team at uber that uses ML (that’s all of them - every interaction with the ride or eats app involves ML) would need to build their own data pipelines, feature stores, training clusters, model storage, etc.  It would take each team copious amounts of time to maintain and improve their systems, and common patterns/best practices would be hard to learn.  In addition, the highest priority use cases (business critical, e.g. rider/driver matching) would themselves need to ensure they have enough compute/storage/engineering resources to operate (outages, scale peaks, etc.), which would results in organizational complexity and constant prioritization battles between managers/directors/etc. Solution Michelangelo provides a single platform that makes the most common and most business critical ML use cases simple and intuitive for builders to use, while still allowing self-serve extensibi...
Image
Above is an activity's lifecycle. Twitter auth only works if the time on the phone being used is correct.  Sometimes the emulator is way off and then I'll get an error when trying to get authorized. Twitter resources: http://blog.enbake.com/developing-an-android-twitter-client-using-twitter4j/ http://twitter4j.org/en/code-examples.html https://github.com/itog/Twitter4j-android-Sample/
Image
OAuth works like the above.  What makes it REALLY difficult to do in android is the constraint that you can only make external calls through an async task (a new thread).  One way to do it with Twitter4j is to setup the Twitter object reference, AccessToken and the RequestToken as globals (ew...) and then use 1 private AsyncTask to call twitter to get the request token, then show the authorize url that's returned so the user can go authorize.  Then ask the user for the verifier, and use it to start another asyncTask to get the accesstoken. 

android tips/notes

APK = Java (src,gen) + Resources (res) R.java = glue between Java and Resources make a project command-line compileable : enter project workspace directory > android update project --name --path . > ant install ( will fail if no device to run on) > ant debug (should succeed, as it only compiles a debug version) info for android virtual machines located in ~/.android/avd/ adb (add sdk/platform-tools to PATH) adb shell adb devices, adb -s To get nexus one working : edit /etc/udev/rules.d/51-android.rules and add SUBSYSTEM=="usb", ATTR{idVendor}=="18D1", MODE="0666", GROUP="plugdev". then unhook phone, and restart everything, then allow debugging on phone, and hook it in and then start eclipse .... that seemed to do the trick 18D1 is the vendor code, i believe for google - don't use the htc one.                              Services : co...

android setup

Download the adt bundle, then use http://developer.android.com/sdk/installing/bundle.html to start your first app. Might need http://developer.android.com/tools/device.html to get a device to test on.  Also might need http://stackoverflow.com/questions/10005907/eclipse-android-plugin-libncurses-so-5 to get the right libraries. Always start eclipse using ./ eclipse - vmargs - Xms1024m - Xmx2048m ( reference : http://stackoverflow.com/a/12335947/1119849 ) AFTER doing all that, you can try using ruboto : http://ruboto.org/

Ruby notes

carlhuda janus dotfiles repo - create one ( for .bash, .bash_profile, .vimrc etc) e.g. gary bernhardt - github drb - https://github.com/garybernhardt/dotfiles rc - resource configuration intellisense vim - supertab pry, interactive_editor - irb tools

Getting a ruby/rails environment setup the easy way

Following directions in http://railscasts.com/episodes/292-virtual-machines-with-vagrant , I came up with an issue where vagrant box couldn't ping google, and therefore couldn't d/l packages. solution : http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client Also,  trouble with nokogiri and/or pg when you do 'bundle update' ?  Checkout http://nokogiri.org/tutorials/installing_nokogiri.html and/or http://stackoverflow.com/questions/6040583/unable-to-install-pg-gem-on-ubuntu-cant-find-the-libpq-fe-h-header .

Notes on Effective Java 2nd Edition

Chapter 3 - Methods Common to All Objects   Item 8 : Obey the general congract when overriding equals - page 33 If you decide to implement equals, make sure it is reflexive: for all x, x.equals(x) symmetric: for all x & y, x.equals(y) iff y.equals(x) transitive: for all x, y, z, if x.equals(y) and y.equals(z), then x.equals(z) must be true consistent: for all x & y, multiple invocations of x.equals(y) return the same result provided nothing used in equality is changed in either x or y for all x, x.equals(null) must return false Item 9 : Always override hashCode when you override equals Item 10 : Always override toString Item 11 : Override clone judiciously Item 12 : Consider implementing Comparable Chapter 4 - Classes and Interfaces   Item 13 : Minimize the accessibility of classes and members accessibilities private package-private (default) protected public classes with public mutable fields are not thread-safe Item 14 : In public cla...