This file contains 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
#!/bin/bash | |
# Check if zip is installed, and install it if it's not | |
if ! command -v zip &> /dev/null | |
then | |
echo "zip is not installed, installing it now..." | |
sudo apt-get update | |
sudo apt-get install zip -y | |
fi |
This file contains 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
#!/bin/bash | |
# Check if zip is installed, and install it if it's not | |
if ! command -v zip &> /dev/null | |
then | |
echo "zip is not installed, installing it now..." | |
sudo apt-get update | |
sudo apt-get install zip -y | |
fi |
This file contains 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
#!/usr/bin/bash | |
# this script accepts 4 arguments | |
# 1. servername (example.com) | |
# 2. admin username | |
# 3. admin password | |
# 4. https (true or false) | |
# 5. ufw (true or false) | |
# | |
# example: ./matrix-install.sh example.com admin password true true |
This file contains 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
#include <Arduino.h> | |
#define FORWARD 'v' | |
#define REVERSE 'r' | |
#define TURN 't' | |
#define CW 'c' | |
#define CCW 'l' | |
#define HALT 'h' | |
#define NDA 'n' |
This file contains 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
#include <Arduino.h> | |
/* | |
Set input mode to 10110100 | |
*/ | |
#define IN1 4 | |
#define IN2 5 |
This file contains 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
# implement bfs algorithm using adj_list | |
from queue import Queue | |
def bfs(adj_list, s): | |
visited = dict.fromkeys(adj_list.keys(), False) | |
parent = dict.fromkeys(adj_list.keys(), None) | |
level = dict.fromkeys(adj_list.keys(), -1) # -1 means not visited | |
bfs_traversal_ouput = [] |
This file contains 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
#include <Wire.h> | |
#include <ErriezBH1750.h> | |
#include <DHT.h>; | |
#include <OneWire.h> | |
#include <DallasTemperature.h> | |
#define ONE_WIRE_BUS 3 | |
BH1750 sensor(LOW); | |
OneWire oneWire(ONE_WIRE_BUS); |
This file contains 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
#include <netinet/in.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
char clientMsg[10] = "Hello"; | |
void main(void) | |
{ |
This file contains 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
""" | |
Assignment 1.1: Given Matrices, find the array attributes of each array, | |
their resultant sum and its array atttributes. | |
""" | |
def printAtributes(v, arr): | |
print("\nMatrix ", v, ":\n\n", arr) | |
print("\nThe number of Dimension : ",arr.ndim) | |
print("Shape:", arr.shape) | |
print("The Number of elements(Size) :", arr.size) | |
print("The data type :", arr.dtype) |
This file contains 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
enable prepare protect duty | |
clock count count count rate accuracy phase cycle | |
--------------------------------------------------------------------------------------------- | |
xin32k 0 0 0 32768 0 0 50000 | |
xin24m 5 5 0 24000000 0 0 50000 | |
clk_rtc32k 0 0 0 32743 0 0 50000 | |
sclk_uart1 0 0 0 24000000 0 0 50000 | |
sclk_uart0 0 0 0 24000000 0 0 50000 | |
xin12m 0 0 0 12000000 0 0 50000 | |
clk_usb3otg_suspend 0 0 0 30770 0 0 50000 |
NewerOlder