Skip to content

Instantly share code, notes, and snippets.

@ardasener
ardasener / init.lua
Last active November 7, 2022 18:48
Nvim Pure Lua Config
-- INDEX
-- BASE
-- PACKER_SETUP
-- PLUGINS
-- DASHBOARD
-- COMMANDS
-- KEYBINDINGS
@ardasener
ardasener / screenparser.py
Created January 10, 2022 12:08
A script to parse any screenshot
import cv2
import easyocr
import numpy as np
import itertools
import random
from sklearn import cluster
from sklearn.preprocessing import Normalizer
from collections import Counter
from copy import deepcopy
import sys
@ardasener
ardasener / sparsebase_new_formats_issue.md
Last active January 11, 2022 11:02
SparseBase New Formats Issue

SparseBase's current (as of version 0.1.2) format system has several weaknesses that we would like to address in the upcomming releases. Here I will be describing these weaknesses. We are already working on new designs and we are also open to suggestions.

Templates

Currently, most classes in the library have three templated types (IDType, NNZType, ValType). These allow the users to set the various underlying arrays of the sparse format to different types. For example all 3 arrays of a CSR could be different types allowing flexible memory and precision management. Since SparseBase's main goal is to accommodate the user's needs, this flexibility is an important feature.

However this system introduces some problems:

  1. We are stuck with these 3 types which might not scale well to a tensor. Since tensor implementations could have any number of arrays, there would be less control on the types of tensor arrays.
  2. Templates take a long time to compile which will only get worse as the library increases in com
@ardasener
ardasener / testClient.py
Created November 30, 2021 16:17
CS403 PA2 Test Client
import Pyro4
import subprocess as sp
import multiprocessing as mp
import threading
import time
def run_btc():
sp.run(["python", "BTCServer.py"])
def run_eth():
@ardasener
ardasener / centrality_orders.cpp
Last active November 8, 2021 13:43
Centrality Orders
#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <omp.h>
#include <random>
#include <regex>
#include <string>
@ardasener
ardasener / new_mint.md
Last active August 14, 2021 20:05
Linux Mint New Install Things To Do

Newer Nodejs

By default the nodejs version is very old. You can instead use NVM.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source .bashrc
nvm install node
@ardasener
ardasener / .bashrc
Created December 1, 2020 16:53
Bash Config
#
# ~/.bashrc
#
# PROMPT
PS1="\e[1;32m-> \e[0m"
@ardasener
ardasener / redshift.conf
Created December 1, 2020 16:00
Redshift
[redshift]
temp-day=4000
temp-night=3500
location-provider=manual
[manual]
lat=41
lon=28
@ardasener
ardasener / i3blocks.conf
Created December 1, 2020 15:59
i3 Blocks Config
# This file is a modified version of the default endeavouros file.
# i3blocks config file
# List of valid properties:
#
# align
# color
# command
# full_text
# instance
@ardasener
ardasener / config
Created December 1, 2020 15:57
i3 Config
# This file is a modified version of the default endeavouros i3 config.
# i3 config file
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# workspace layouts:
#default i3 tiling mode