This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* bubble_sort.s | |
* | |
* Created on: 4/8/2022 | |
* Author: Shankar | |
*/ | |
.syntax unified | |
.cpu cortex-m4 | |
.fpu softvfp | |
.thumb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## How to get all possible combinations of a list’s elements? | |
def combs(a): | |
if len(a) == 0: | |
return [[]] | |
cs = [] | |
for c in combs(a[1:]): | |
cs += [c, c+[a[0]]] | |
return cs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public log As Logger | |
Option Explicit ' Used at the module level to force explicit declaration of all variables in that module | |
' ================================== Variables for initVars sub ================================== | |
Dim dutySlotsSheet As String | |
Dim dutySlotsStartRow As Integer | |
Dim dateCol As Integer | |
Dim dayCol As Integer | |
Dim firstActualCol As Integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public log As Logger | |
' ================================== Variables for initVars sub ================================== | |
Dim dutySlotsSheet As String | |
Dim dutySlotsStartRow As Integer | |
Dim dateCol As Integer | |
Dim dayCol As Integer | |
Dim firstActualCol As Integer | |
Dim firstStbCol As Integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Quick and dirty functions that make serial communications work. | |
Note that receiveByte() blocks -- it sits and waits _forever_ for | |
a byte to come in. If you're doing anything that's more interesting, | |
you'll want to implement this with interrupts. | |
initUSART requires BAUDRATE to be defined in order to calculate | |
the bit-rate multiplier. 9600 is a reasonable default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame.locals import * | |
import cv2 | |
import numpy as np | |
import sys | |
camera = cv2.VideoCapture(0) | |
pygame.init() | |
pygame.display.set_caption("OpenCV camera stream on Pygame") | |
screen = pygame.display.set_mode([1280,720]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Author : Shankar (sangha) | |
"" Searching | |
set hlsearch " highlight matches | |
set incsearch " incremental searching | |
set ignorecase " searches are case insensitive... | |
set smartcase " ... unless they contain at least one capital letter | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET = a | |
LIBS = -lm | |
CC = gcc | |
CFLAGS = -g -Wall | |
.PHONY: default all clean | |
default: $(TARGET) | |
all: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cSpell.userWords": [ | |
"zymotic" | |
], | |
"editor.formatOnSave": true, | |
"editor.minimap.enabled": false, | |
"editor.rulers": [ | |
79, | |
], | |
"files.autoSave": "onFocusChange", |