Skip to content

Instantly share code, notes, and snippets.

View taiypeo's full-sized avatar

Ivan Lysenko taiypeo

View GitHub Profile
@taiypeo
taiypeo / permutation.py
Created November 10, 2019 22:21
Permutation class for my linear algebra course
class Permutation:
def __init__(self, perm_list):
self.perm_list = perm_list
self.n = len(perm_list)
def __repr__(self):
return (
' '.join([str(i) for i in range(1, self.n + 1)]) +
'\n' +
' '.join([str(i) for i in self.perm_list])
@taiypeo
taiypeo / pi.go
Last active March 14, 2023 11:27
Concurrent π calculation with Golang!
package main
import (
"fmt"
"math"
)
func partialSum(c chan<- float64, kStart int, kOffset int, amount int) {
// Using the Bailey–Borwein–Plouffe formula
@taiypeo
taiypeo / spaapsshell.lua
Created December 22, 2019 06:29
A shell I made years ago for ComputerCraft
path = ""
sel = 1
function init()
term.clear()
term.setCursorPos(1,1)
dir = fs.list("")
for a, i in ipairs(dir) do
if a == 1 then