Skip to content

Instantly share code, notes, and snippets.

View fredcy's full-sized avatar

Fred Yankowski fredcy

View GitHub Profile
@karpathy
karpathy / min-char-rnn.py
Last active November 20, 2024 02:50
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@seanhess
seanhess / Form.elm
Created September 14, 2015 01:52
Form.elm
type Action
= Update String
| Enter
type alias Model = { text : String }
update : Action -> Model -> Model
update action model
case action of
Update txt -> { model | text <- txt }
import Graphics.Element exposing (show)
import List exposing (map, map2, length, repeat, concat, sum, foldl, filterMap, isEmpty, member, head, tail, indexedMap, filter)
import Maybe exposing (andThen)
import Color
import Graphics.Element exposing (..)
--main = show <| constrainLine [1, 1] [Nothing, Just False, Nothing, Nothing]
--main = show <| tile [1, 1] [Nothing, Just False, Nothing, Nothing]
main = showGrid <| Maybe.withDefault grid0 <| constrainGrid rows cols grid0 `andThen`
constrainGrid rows cols `andThen`
import Effects exposing (Effects(..), Never)
import Html exposing (Html, div, button, text)
import Html.Events exposing (onClick)
import Signal exposing (Mailbox)
import StartApp as SA
import Task exposing (Task(..))
type Request = DummyRequest | Request String
type Response = Response String
module Slider exposing (Model, Msg, init, update, view)
import Html exposing (..)
import Html.Attributes as A
import Html.Events exposing (..)
import Json.Decode as D
import String as S
type alias Model =
{ name : String
, min : Float
@klaftertief
klaftertief / reactiveconf-2016-lightning-talk.md
Last active April 2, 2024 20:17
An API search engine in Elm for Elm, proposal for a Lightning Talk at ReactiveConf 2016

An API search engine in Elm for Elm

Elm is a statically typed functional language that compiles to JavaScript. It's well-known for its developer experience: the compiler provides nice error messages, the package system enforces semantic versioning for all published packages and makes sure every exposed value or type has some documentation and type annotations.

@suhlig
suhlig / install-tmux
Last active October 12, 2023 21:25 — forked from philipsd6/install-tmux
Install tmux on rhel/centos
# Install tmux on rhel/centos 7
# What do we want?
libeventversion=2.1.11
tmuxversion=3.1
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
@dakk
dakk / tezos-baking-howto.md
Last active March 6, 2022 21:22
tezos-baking-howto.md

Tezos baking howto

This howto is valid for Betanet on Ubuntu or Debian

Setup

Prereq

You have to install some dependencies. In debian / ubuntu run:

// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*
@et4te
et4te / htlc.ml
Last active August 5, 2018 09:36
Tezos Atomic Swap
[%%version 0.3]
type storage =
{ version : string;
secret_hash : bytes;
issuer : address;
issuer_hash : key_hash;
recipient_hash : key_hash;
timeout : timestamp;
}