Skip to content

Instantly share code, notes, and snippets.

💭
trying this field out

Lauren Chris Horne lahwran

💭
trying this field out
  • Berkeley, CA
Block or report user

Report or block lahwran

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View argparse_wrap.py
# ARGPARSE_WRAP: simple form of command registration for argparse
# Open sourced from Vast.ai internal tools
# MIT license
import argparse
import sys
import os
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@lahwran
lahwran / SassMeister-input.scss
Created Jun 7, 2018
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (vundefined)
// Compass (vundefined)
// dart-sass (v1.2.1)
// ----
@mixin a-mixin() {
content: "mixin root";
View keybase.md

Keybase proof

I hereby claim:

  • I am lahwran on github.
  • I am lahwran (https://keybase.io/lahwran) on keybase.
  • I have a public key whose fingerprint is F2BC DEA3 11EA 493A 9937 3275 075D 6E3B 1093 C71D

To claim this, I am signing this object:

View husl_error_test.py
from mpmath import mp, sqrt, atan2
mp.dps = 250
luv_good = mp.mpf("36.14585083971970000000000000000000"), mp.mpf("0.00000000000179982851973451000000"), mp.mpf("0.00000000000059994283991150500000")
luv_bad = mp.mpf("36.14585083971970000000000000000000"), mp.mpf("0.00000000000178678628408426000000"), mp.mpf("0.00000000000062602731121200500000")
lch_good = mp.mpf("36.14585083971970000000000000000000"), mp.mpf("0.00000000000189718584003013000000"), mp.mpf("18.43494882292200000000000000000000")
lch_bad = mp.mpf("36.14585083971970000000000000000000"), mp.mpf("0.00000000000189328165347235000000"), mp.mpf("19.30867293488920000000000000000000")
View code.js
layer_defs = [];
layer_defs.push({type:'input', out_sx:28, out_sy:28, out_depth:1});
layer_defs.push({type:'conv', sx:5, filters:8, stride:2, pad:2, activation:'tanh'});
layer_defs.push({type:'fc', num_neurons:20, activation:'tanh'});
layer_defs.push({type:'fc', num_neurons:50, activation:'tanh'});
layer_defs.push({type:'fc', num_neurons:4, activation:'tanh'});
layer_defs.push({type:'fc', num_neurons:10, activation:'tanh'});
layer_defs.push({type:'fc', num_neurons:50, activation:'tanh'});
layer_defs.push({type:'fc', num_neurons:50, activation:'tanh'});
layer_defs.push({type:'regression', num_neurons:28*28});
View 723628680_runtime_size_owned_array.md

2-13 12:15 <lahwran> how would one have an owned unknown-size non-resizeable array?
2-13 12:15 <reem> Box<[T]>
2-13 12:15 <lahwran> there's absolutely no way to have it on the stack?
2-13 12:15 <reem> Nope
2-13 12:15 <reem> There is no dynamic sizing on the stack right now

View gist:7e284dbbcfe72b66345f

Algorithms: Linked Lists

The challenge: Implement a generic linked list that can contain typed values.

You may do either a black box array-like-interface, that provides index-based APIs, or a "white" box linked-list-style interface, that provides list-node-based APIs.

Variations: Implement both single and double linked versions. Feel free to copy and paste between them, but for exercise reasons, keep them separate, and do not try to reuse code.

Implement the four operations listed on the site:

@lahwran
lahwran / gist:957fcd5b772cc11e79cc
Last active Aug 29, 2015
Hit `raw` to get a wrapped version.
View gist:957fcd5b772cc11e79cc
Conversation about lifetimes on #rust, on mozilla's irc network,
prompted by hamnox and lahwran attempting to understand lifetimes.
Timestamps are in Mountain time.
1-30 07:09.06pm <lahwran> so we're reading this http://doc.rust-lang.org/book/ownership.html
1-30 07:09.28pm <lahwran> it mentions lifetimes a lot, and gives examples of where to use lifetimes, and the effects of lifetimes, but it has yet to actually, you know, describe what a lifetime is
1-30 07:09.48pm <theme> lahwran, I actually treat lifetimes as dependency markers
1-30 07:10.05pm <lahwran> we (my partner and I) have made several guesses as we read as to what lifetimes are, based on inference, but then we got to the point where a function used a lifetime both for an input and an output
1-30 07:10.06pm <Havvy> They're descriptions to how long a value lives.
You can’t perform that action at this time.