Skip to content

Instantly share code, notes, and snippets.

View jayanta525's full-sized avatar

Jayantajit Gogoi jayanta525

View GitHub Profile
@jayanta525
jayanta525 / restore.sh
Created October 18, 2023 19:14
matrix-restore
#!/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
@jayanta525
jayanta525 / matrix-backup.sh
Last active October 18, 2023 18:22
matrix-backup.sh
#!/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
#!/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
#include <Arduino.h>
#define FORWARD 'v'
#define REVERSE 'r'
#define TURN 't'
#define CW 'c'
#define CCW 'l'
#define HALT 'h'
#define NDA 'n'
#include <Arduino.h>
/*
Set input mode to 10110100
*/
#define IN1 4
#define IN2 5
# 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 = []
#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);
@jayanta525
jayanta525 / client.c
Last active November 21, 2021 20:26
multithread-assignment-os
#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)
{
@jayanta525
jayanta525 / assignment1.1.py
Created November 19, 2021 06:19
tezu-temporary-assignment
"""
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)
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