Skip to content

Instantly share code, notes, and snippets.

View roessland's full-sized avatar
🎯
Focusing

Andreas Røssland roessland

🎯
Focusing
View GitHub Profile
@roessland
roessland / add-git-exe-to-path.ps1
Created November 17, 2019 14:35
Add git.exe to path without adding sh.exe and bash.exe using PowerShell
$a = Get-Item 'C:\Program Files\Git\bin\git.exe'
$b = New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\$($a.BaseName).exe"
$b.SetValue("", $a.FullName)
$b.SetValue("Path", $a.DirectoryName + '\')
@roessland
roessland / install-git2.sh
Created March 5, 2019 14:24
Install Git 2 from source on Red Hat 7
# Install git2
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
sudo yum install gcc perl-ExtUtils-MakeMaker
sudo yum remove git
wget https://www.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
tar xvf git-2.9.5.tar.gz
cd git-2.9.5
make prefix=/usr/local/git all
sudo make prefix=/usr/local/git install
import "fmt"
import "sort"
import "strconv"
import "log"
import "bufio"
import "os"
import "strings"
import "io/ioutil"
import "encoding/csv"
import "github.com/roessland/gopkg/disjointset"
#### Issue Description
I'm a new user of nd4j, and I just installed nd4j 0.9.1 using SBT and tried running the following:
```
// Note, I only need to find eigs for symmetric matrices,
// but this particular one is not symmetric.
INDArray M = Nd4j.create(new float[]{-2,4,2, -2,1,2, 4,2,5}, new int[]{3,3});
IComplexNDArray eigs = Eigen.eigenvalues(M);
System.out.println(eigs);
```
### Keybase proof
I hereby claim:
* I am roessland on github.
* I am roessland (https://keybase.io/roessland) on keybase.
* I have a public key whose fingerprint is 0FF9 45DB 3E4F 5E12 551D A9CA 834B 0837 51C2 6304
To claim this, I am signing this object:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roessland
roessland / Golang SimpleHTTPServer
Created July 17, 2014 19:53
SImilar to python -m SimpleHTTPServer and node's http-server, only in Go.
//usr/bin/go run $0 $@ ; exit
package main
import (
"fmt"; "log"; "net/http"
)
func main() {
fmt.Println("Serving files in the current directory on port 8002")
http.Handle("/", http.FileServer(http.Dir(".")))
err := http.ListenAndServe(":8002", nil)
if err != nil {
from custom_comments.forms import SimpleCommentForm
def get_form():
return SimpleCommentForm