Skip to content

Instantly share code, notes, and snippets.

View salomaestro's full-sized avatar
Always online

Christian Salomonsen salomaestro

Always online
View GitHub Profile
@salomaestro
salomaestro / Dockerfile
Created March 17, 2023 00:40
valgrind dockerfile
from alpine:latest
# Add valgrind and g++
run apk add g++ valgrind make
# Set working directory
workdir /code

Keybase proof

I hereby claim:

  • I am salomaestro on github.
  • I am csalomonsen (https://keybase.io/csalomonsen) on keybase.
  • I have a public key ASDbC0puRcqSKokhXV-DqC3WtjJK0iyEeP3jxqKyt6qbRwo

To claim this, I am signing this object:

@salomaestro
salomaestro / programmeringsoppgave3-gjennomgang.py
Created September 12, 2022 17:01
Gjennomgang av programmeringsoppgave 3
import numpy as np
import matplotlib.pyplot as plt
def vec(x, y):
"""
En funksjon som lager en 2-dimensjonal vektor (numpy array).
Argumenter
----------
@salomaestro
salomaestro / programmeringsoppgave2-gjennomgang.py
Created September 12, 2022 16:46
Gjennomgang av programmeringsoppgave nr.2
import matplotlib.pyplot as plt
import numpy as np
def vector(x, y):
"""
En funksjon som lager en 2-dimensjonal vektor (numpy array).
Argumenter
----------
@salomaestro
salomaestro / bisection.py
Created August 29, 2022 15:46
File for recursively find a solution to a given function f on a interval [a, b] using the Intermediate Value Problem
import matplotlib.pyplot as plt
import numpy as np
class Node:
def __init__(self, boundary: tuple, depth: int, right: bool):
self.boundary = boundary
self.depth = depth
self.right = right
self.left = not right