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
public class TensorflowInferencePredictor : ITidePredictor | |
{ | |
const string MODEL_FILE_URL = "file:///android_asset/TF_LSTM_Inference.pb"; | |
const string INPUT_ARGUMENT_NAME = "lstm_1_input"; | |
const string OUTPUT_VARIABLE_NAME = "output_node0"; | |
const int OUTPUT_SIZE = 100; | |
TensorFlowInferenceInterface inferenceInterface; | |
public TensorflowInferencePredictor(AssetManager assetManager) |
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 numpy as np | |
from keras.models import Sequential | |
from keras.layers.core import Activation, Dense | |
from keras.optimizers import SGD | |
# Trains a neural net that recognizes the digit displayed by a 7-segment LED: | |
# "Lit segments" are indexed as: | |
# -- 0 -- | |
# | | | |
# 1 2 |
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
--- | |
uti: com.xamarin.workbook | |
platforms: | |
- iOS | |
--- | |
```csharp | |
using MapKit; | |
``` |
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
string output = ""; | |
bool reset = false; | |
int input = 15; | |
public override void ViewDidLoad () | |
{ | |
base.ViewDidLoad (); | |
// Perform any additional setup after loading the view, typically from a nib. | |
/* |
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
### Keybase proof | |
I hereby claim: | |
* I am lobrien on github. | |
* I am lobrien (https://keybase.io/lobrien) on keybase. | |
* I have a public key whose fingerprint is E928 7FF1 AD56 4639 010F 50D2 A95D 15EA EBBE D5BD | |
To claim this, I am signing this object: |
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
using System; | |
enum Direction { N, S, E, W} | |
static class X { | |
public static double NominalDirectionInRadians(this Direction d) | |
{ | |
var idx = (int)d; | |
var directionCount = Enum.GetNames (typeof(Direction)).Length; | |
var pct = (double) idx / directionCount; |
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
public abstract class Hole | |
{ | |
public static readonly float LineWidth = 2f; | |
protected Hole(int radius) | |
{ | |
Radius = radius; | |
} | |
public PointF Point { get; set; } |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
using System.Drawing; | |
using MonoTouch.CoreGraphics; | |
namespace SingleFileTableViewSolution | |
{ |
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
public override void TouchesBegan(NSSet touches, UIEvent evt) | |
{ | |
var addressString = "2 Park Plaza, Boston, MA, USA 02116"; | |
var geocoder = new CLGeocoder(); | |
var taskCoding = geocoder.GeocodeAddressAsync(addressString); | |
taskCoding.ContinueWith((addresses) => { | |
Console.WriteLine("Continuation"); | |
foreach(var address in addresses.Result) | |
{ | |
Console.WriteLine(address); |
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
public override void TouchesBegan(NSSet touches, UIEvent evt) | |
{ | |
var addressString = "2 Park Plaza, Boston, MA, USA 02116"; | |
var geocoder = new CLGeocoder(); | |
geocoder.GeocodeAddress(addressString, (addresses, error) => { | |
foreach(var address in addresses) | |
{ | |
Console.WriteLine(address); | |
} |