Skip to content

Instantly share code, notes, and snippets.

@pvmart
pvmart / arch.sh
Last active September 3, 2018 15:03
#!/bin/bash
set -e
set -o pipefail
dd if=/dev/zero of=/dev/sda bs=1024 count=10
RAM=$(free -m | awk '/Mem:/{print $2}')
cat > disk.sf <<EOF
@pvmart
pvmart / arch-raid1.sh
Last active May 18, 2023 15:03
Install arch linux on btrfs raid1
#!/bin/bash
set -e
set -o pipefail
dd if=/dev/zero of=/dev/sda bs=1024 count=10
dd if=/dev/zero of=/dev/sdb bs=1024 count=10
RAM=$(free -m | awk '/Mem:/{print $2}')
@pvmart
pvmart / fmincg.f90
Last active September 18, 2015 03:23 — forked from jshahbazi/fmincg.f90
fmincg minimization function ported to Fortran
real function fmincg(length, nn_params, input_layer_size, hidden_layer_size, num_labels, inputdata, y, lambda)
implicit none
! Copyright (C) 2001 and 2002 by Carl Edward Rasmussen. Date 2002-02-13
! (C) Copyright 1999, 2000 & 2001, Carl Edward Rasmussen
!
! Permission is granted for anyone to copy, use, or modify these
! programs and accompanying documents for purposes of research or
! education, provided this copyright notice is retained, and note is
! made of any changes that have been made.