Skip to content

Instantly share code, notes, and snippets.

View fcayci's full-sized avatar

Furkan Cayci fcayci

  • Newark, DE
View GitHub Profile
--[[
=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
Kickstart.nvim is *not* a distribution.
Kickstart.nvim is a template for your own configuration.
The goal is that you can read every line of code, top-to-bottom, and understand
@fcayci
fcayci / asm.s
Last active November 15, 2020 16:50
basic assembly template for keil ARM simulator
Stack_Size EQU 0x00000400
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp
THUMB
AREA RESET, DATA, READONLY
EXPORT __Vectors
@fcayci
fcayci / Makefile
Last active October 7, 2021 08:45
Starting template for C projects
TARGET = banana
CC = gcc
LD = gcc
# Add your sources here
SRCS += main.c
SRCS += banana.c
INCLUDES += -I.
################################################################
# This is a generated script based on design: design_1
#
# Though there are limitations about the generated script,
# the main purpose of this utility is to make learning
# IP Integrator Tcl commands easier.
################################################################
namespace eval _tcl {
################################################################
# This is a generated script based on design: design_1
#
# Though there are limitations about the generated script,
# the main purpose of this utility is to make learning
# IP Integrator Tcl commands easier.
################################################################
namespace eval _tcl {
################################################################
# This is a generated script based on design: gpio_bram
#
# Though there are limitations about the generated script,
# the main purpose of this utility is to make learning
# IP Integrator Tcl commands easier.
################################################################
namespace eval _tcl {
@fcayci
fcayci / grade_midterm2020.py
Created September 8, 2020 05:30
autograde midterm 2020
# grade midterm 2020
# requirements:
# python3
# pip3 install boolean.py (boolean evaluation)
# matplotlib for plotting
# numpy - a couple small parts
import logging
# where do you wanna log? go to DEBUG / INFO / WARNING
@fcayci
fcayci / gen_ranks.py
Created September 8, 2020 05:29
Generate unique ranks for exam
# generate ranks for mid2020
def read_csv(fname):
import csv
with open(fname, 'r') as f:
n = []
s = csv.reader(f, delimiter=',')
for i, row in enumerate(s):
if i == 0:
@fcayci
fcayci / gen_alu.py
Created September 8, 2020 05:29
Generate test vectors for alu2020 design
# generate test vectors for alu2020
BIT_WIDTH = 32
INT_MAX = 2**(BIT_WIDTH-1)-1
INT_MIN = -2**(BIT_WIDTH-1)
UINT_MAX = 2**(BIT_WIDTH)-1
ALU_OPS = {
'ALU_ADD' : '0000',
'ALU_SUB' : '1000',
@fcayci
fcayci / vcard2abook.py
Created June 19, 2020 12:45
vcard to abook conversion for mal
with open('contacts.vcf') as f:
r = f.read()
contacts = r.split('VCARD')
with open('out.csv', 'w') as f:
for c in contacts:
if 'FN:' in c:
x = c.strip().split('FN:')
y = x[1].strip().split('N:')