Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 jax.numpy as jnp | |
from jax import jit, vmap, grad, value_and_grad | |
from jax import random | |
import jax | |
SEED = 42234 | |
key = random.PRNGKey(SEED) | |
# hyperparameters | |
hidden_size = 100 |
This file contains 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
#!/bin/bash | |
set +e | |
curl ww.somesitethatdoesnotexist.com |
This file contains 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 Data.Map qualified as M | |
import Data.List qualified as L | |
is_interleaved :: String -> String -> String -> Bool | |
is_interleaved a b inte = let alen = length a | |
blen = length b | |
k x y | |
| (x == alen) = drop y b == drop (x+y) inte | |
| (y == blen) = drop x a == drop (x+y) inte | |
| otherwise = ((a L.!! x == dest_elem) && ds M.! (x + 1,y)) || ((b L.!! y == dest_elem) && ds M.! (x ,y + 1)) |
This file contains 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 qualified Data.List as L | |
import Control.Monad (foldM) | |
import qualified Data.Map as M | |
import System.Random (randomRIO, RandomGen, randomR, initStdGen ) | |
import Debug.Trace (trace) | |
import qualified Data.Set as S | |
type ConfigMap = (Int, Int) | |
type Vertex = (Int, Int) | |
type Graph = M.Map Vertex [(Vertex)] |
This file contains 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 Data.Maybe (fromMaybe) | |
import Debug.Trace (traceShow, trace) | |
data GameTree a = Leaf a | Nodes (Maybe a) [GameTree a] deriving (Show, Eq) | |
type IsMaximizingPlayer = Bool | |
example :: GameTree Int | |
example = | |
Nodes Nothing |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
inputfile=$1 | |
filename="${inputfile%.*}" | |
line_count=$(wc -l < $1) | |
row_count=$((${line_count} - 1)) | |
movement=$(($row_count/$2)) |
This file contains 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
ls | grep -i .pdf | while read -r line ; do | |
egg=$(pdfinfo "$line" | grep Pages | sed 's/[^0-9]*//') | |
if [ $egg -gt 20 ]; then | |
echo "Processing $line with $egg" | |
mv "$line" BOOKS | |
fi | |
done |
This file contains 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
#!/usr/bin/env python | |
import os.path | |
import sys | |
import datetime | |
project_clj = "project.clj" | |
migration_directory = "resources/migrations" |
NewerOlder