Skip to content

Instantly share code, notes, and snippets.

View lobrien's full-sized avatar
💭
About 7,000 miles away from lounge access.

Larry O'Brien lobrien

💭
About 7,000 miles away from lounge access.
View GitHub Profile
### 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:
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.
/*
---
uti: com.xamarin.workbook
platforms:
- iOS
---
```csharp
using MapKit;
```
@lobrien
lobrien / led_segs.py
Last active April 9, 2024 09:59
Keras neural net that recognizes number in a 7-segment display
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
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)
@lobrien
lobrien / gist:100c77c8d49ca1f4c33a2c004b872537
Created June 26, 2018 19:53
GCode for temp tower, Tevo Tornado 225-180 layers
This file has been truncated, but you can view the full file.
;FLAVOR:Marlin
;TIME:7421
;Filament used: 5.56723m
;Layer height: 0.2
;Generated with Cura_SteamEngine 3.3.1
M190 S60
M104 S200
M109 S200
M82 ;absolute extrusion mode
G28 ;Home
@lobrien
lobrien / FlexLayoutOptions.workbook
Last active May 6, 2021 00:47
Xamarin.Forms FlexLayout Major Steps
uti id title platforms packages
com.xamarin.workbook
7e650a9b-4216-4b28-945c-217cd85530b2
FlexLayout Options
Android
id version
Xamarin.Forms
3.0.0.482510
@lobrien
lobrien / xor.py
Created October 12, 2018 21:47
"Hello, World" Keras Neural Net (XOR)
import numpy as np
from keras.models import Sequential
from keras.layers.core import Activation, Dense
from keras.optimizers import SGD
# Allocate the input and output arrays
X = np.zeros((4, 2), dtype='uint8')
y = np.zeros(4, dtype='uint8')
# Training data X[i] -> Y[i]
@lobrien
lobrien / gist:fdc2492764a65939c53e259e64ffb7bf
Created December 23, 2018 18:55
Robert Reich, Jan 21 2017
I had breakfast recently with a friend who's a former Republican member of Congress. Here's what he said:
Him: Trump is no Republican. He’s just a big fat ego.
Me: Then why didn’t you speak out against him during the campaign?
Him: You kidding? I was surrounded by Trump voters. I’d have been shot.
Me: So what now? What are your former Republican colleagues going to do?
@lobrien
lobrien / combinators.js
Created March 27, 2019 19:11 — forked from Avaq/combinators.js
Common combinators in JavaScript
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));