Skip to content

Instantly share code, notes, and snippets.

@marthall
marthall / 1: helloworld
Last active February 5, 2020 07:00
Very basic python packaging
#!/usr/bin/env python
print "Hello World"
@marthall
marthall / forest.py
Last active May 22, 2016 14:21
Forest export to graphics
from sklearn.tree import export_graphviz
out = export_graphviz(forest.estimators_[0], out_file='tree.dot')
# From terminal:
# dot -Tpng tree.dot -o tree.png
# http://scikit-learn.org/stable/modules/generated/sklearn.tree.export_graphviz.html
.thumb
.syntax unified
.include "gpio_constants.s"
.text
.global Start
.global GPIO_ODD_IRQHandler
Start:
.thumb
.syntax unified
.include "gpio_constants.s" // Register-adresser og konstanter for GPIO
.global GPIO_ODD_IRQHandler
.thumb_func
.text
.global Start
Start:
LDR R0, =GPIO_BASE
MOV R1, #0b00000100
STR R1, [R0, #PORT_SIZE * PORT_E + GPIO_PORT_DOUTSET]
@marthall
marthall / config.py
Last active December 25, 2015 18:49
LDAP-oppsett mot NTNU
# env/lib/python2.6/site-packages/django_auth_ldap/config.py
def is_member(self, ldap_user, group_dn):
"""
Returns True if the group is the user's primary group or if the user is
listed in the group's memberUid attribute.
"""
try:
user_uid = ldap_user.attrs['uid'][0]
@marthall
marthall / settings.py
Last active December 19, 2015 08:49
Hvordan definere template dirs i et Djangoprosjekt
# Utdrag fra settings.py
# Dette gjøres gjerne i toppen av filen, så man kan bruke DIRPATH overalt
import os
DIRPATH = os.path.dirname(__file__)
# Dette blir pathen til alle globale templates, eller andre templates du vil inkludere
TEMPLATE_DIRS = (
os.path.join(DIRPATH, 'templates/'),
)
(defn feed-forward [input weights biases]
(doseq [[w b] (map vector weights biases)]
(set! input (sigmoid (+ (dot w input) b))))
input)
diff --git a/abakus-statutter/01-03-foreningen.tex b/abakus-statutter/01-03-foreningen.tex
index 8859376..c17b1ff 100644
--- a/abakus-statutter/01-03-foreningen.tex
+++ b/abakus-statutter/01-03-foreningen.tex
@@ -15,5 +15,5 @@ skal derfor godkjennes av generalforsamlingen ved kvalifisert flertall.
\subsection{}
Foreningens offisielle logo skal alltid benyttes på fane og diplomer.
-Foreningens navn eller logo skal alltid benyttes på medaljer.
+Foreningens navn og/eller logo skal alltid benyttes på medaljer.
diff --git a/Makefile b/Makefile
index d5c09cb..bd4e4c8 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ all: $(ABAKUS).pdf $(FOND).pdf
test: clean all jekyll
-%.pdf: %.tex
+%.pdf: *.tex