Skip to content

Instantly share code, notes, and snippets.

Avatar
🏄‍♂️
fix f = let x = f x in x

Rick Winfrey rewinfrey

🏄‍♂️
fix f = let x = f x in x
View GitHub Profile
View salsa.md

Ingredients

  • 1 can 28oz whole or crushed tomatoes (Scalfani tomatoes are the best)
  • 1 small white onion (can also substitute green onion)
  • half a bundle of cilantro
  • handful fresh oregano
  • 2-4 garlic cloves
  • 1-2 jalepenos
  • juice from 1/2 lime
  • 2 tsp sea salt or kosher salt
View 111.java
package VoltIJ.gui.layers;
import VoltIJ.core.Font;
import com.sun.opengl.util.texture.Texture;
import com.sun.opengl.util.texture.TextureIO;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.media.opengl.GL;
@rewinfrey
rewinfrey / example.java
Created Feb 1, 2018
Difference in instantiation semantics in Java for String.
View example.java
class Playground {
public static void main(String[ ] args) {
String[] ex1 = new String[] { new String("a"), "b" };
String[] ex2 = new String[] { new String("a"), "b" };
evaluateReferenceEquality(ex1, ex2);
evaluateValueEquality(ex1, ex2);
}
View friday.md
@rewinfrey
rewinfrey / Thing.hs
Created Jul 12, 2017
What do you do when you have a Thing but no db id?
View Thing.hs
#!/usr/bin/env stack
-- stack script --resolver lts-8.12
{-# LANGUAGE OverloadedStrings #-}
import Data.Text
import System.Random
data Thing = Thing { id :: Int, name :: Text } deriving Show
main :: IO ()
@rewinfrey
rewinfrey / Thing.hs
Created Jul 12, 2017
What do you do when you have a Thing but no db id?
View Thing.hs
#!/usr/bin/env stack
-- stack script --resolver lts-8.12
{-# LANGUAGE OverloadedStrings #-}
import Data.Text
import System.Random
data Thing = Thing { id :: Int, name :: Text } deriving Show
main :: IO ()
@rewinfrey
rewinfrey / decorator.md
Created Jul 7, 2017
What is a Python Decorator?
View decorator.md

Decorators in Python

Given a function:

def example():
  return

Given a function that takes as one of its inputs a function (we'll call this our decorator):

View maybe.rb
class Maybe
attr_reader :run_maybe
def initialize(result)
@run_maybe = construct(result)
end
def construct(result)
if result == ""
Nothing.new
@rewinfrey
rewinfrey / RecursionSchemesExample.hs
Created May 26, 2017
Recursion Schemes in Haskell
View RecursionSchemesExample.hs
#!/usr/bin/env stack
-- stack --resolver lts-8.12 script
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}
import qualified Data.Text as T
import ClassyPrelude
import Data.Functor.Foldable
@rewinfrey
rewinfrey / errors.txt
Created Apr 26, 2017
tree-sitter-python parse errors for tensorflow
View errors.txt
Error parsing /Users/rewinfrey/code/python/tensorflow/tensorflow/compiler/tests/binary_ops_test.py (ERROR [44, 38] - [44, 44])
Error parsing /Users/rewinfrey/code/python/tensorflow/tensorflow/compiler/tests/clustering_test.py (ERROR [46, 42] - [46, 48])
Error parsing /Users/rewinfrey/code/python/tensorflow/tensorflow/compiler/tests/conv2d_test.py (ERROR [63, 54] - [63, 55])
Error parsing /Users/rewinfrey/code/python/tensorflow/tensorflow/compiler/tests/conv3d_test.py (ERROR [63, 26] - [63, 27])
Error parsing /Users/rewinfrey/code/python/tensorflow/tensorflow/compiler/tests/dynamic_stitch_test.py (ERROR [49, 49] - [49, 50])
Error parsing /Users/rewinfrey/code/python/tensorflow/tensorflow/compiler/tests/function_test.py (ERROR [53, 42] - [53, 48])
Error parsing /Users/rewinfrey/code/python/tensorflow/tensorflow/compiler/tests/jit_test.py (ERROR [47, 27] - [47, 66])
Error parsing /Users/rewinfrey/code/python/tensorflow/tensorflow/compiler/tests/lrn_ops_test.py (ERROR [91, 22] - [91, 29])
Error parsing /Users/rew
You can’t perform that action at this time.