Skip to content

Instantly share code, notes, and snippets.

View markusrenepae's full-sized avatar

Markus Rene Pae markusrenepae

View GitHub Profile
@markusrenepae
markusrenepae / numpy2.py
Last active January 18, 2020 00:31
First code snippet for Medium article about Numpy
time1 = time.perf_counter_ns()
####################################
####################################
#### ####
#### CODE BLOCK ####
#### ####
####################################
####################################
time2 = time.perf_counter_ns()
print = time2 - time1
@markusrenepae
markusrenepae / taylor.py
Created April 17, 2020 18:09
See programmilõik käib kaasas minu kodutööga, mille eesmärgiks oli lähendada Taylori valemiga funktsiooni f(x) = ln(x).
import matplotlib
import numpy as np
from math import *
import matplotlib.pyplot as plt
'''Funktsioon, mida peame lähendama: f(x) = ln(x)'''
def f(x):
output = []
for elem in x: