Skip to content

Instantly share code, notes, and snippets.

View arikchakma's full-sized avatar
🐼
Reacting

Arik Chakma arikchakma

🐼
Reacting
View GitHub Profile
-- a. CREATE EMPLOYEE table
CREATE TABLE
EMPLOYEE (
emp_id NUMBER (11, 0) NOT NULL,
fname VARCHAR(40),
lname VARCHAR(40),
stor_id NUMBER (11, 0),
job_id NUMBER (11, 0),
pub_id NUMBER (11, 0),
hire_date DATE,
#include <WiFi.h>
#include <HTTPClient.h>
#include <WiFiClientSecure.h>
#include <LiquidCrystal_I2C.h>
#include "DHT.h"
#include <ArduinoJson.h>
// === Wi-Fi Credentials ===
const char *ssid = "God";
const char *password = "PrayToGod";
@arikchakma
arikchakma / building-sync-systems.md
Created June 2, 2024 17:15 — forked from pesterhazy/building-sync-systems.md
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

{"type":"doc","content":[{"type":"spacer","attrs":{"height":"lg"}},{"type":"logo","attrs":{"src":"https://maily.to/brand/logo.png","alt":null,"title":null,"maily-component":"logo","size":"sm","alignment":"left"}},{"type":"spacer","attrs":{"height":"xl"}},{"type":"paragraph","attrs":{"textAlign":"left"},"content":[{"type":"text","text":"Hey "},{"type":"variable","attrs":{"id":"username","label":null,"fallback":null}},{"type":"text","text":" 👋"}]},{"type":"paragraph","attrs":{"textAlign":"left"},"content":[{"type":"text","text":"It's been a long time coming..."}]},{"type":"paragraph","attrs":{"textAlign":"left"},"content":[{"type":"text","text":"Since our initial launch, many changes have occurred. I've rewritten the compiler using "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://react.email","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"react-email"},{"type":"text","text":", enhancing its flexibility and maintainability."}]},{"type":"bulletList","content":[{"t
int L_EN_FOR_ONE=3;
int L_PWM_FOR_ONE=5;
int R_EN_FOR_ONE=4;
int R_PWM_FOR_ONE=6;
int L_EN_FOR_TWO=8;
int R_EN_FOR_TWO=9;
int L_PWM_FOR_TWO=10;
int R_PWM_FOR_TWO=11;
@arikchakma
arikchakma / exam.py
Last active December 17, 2022 18:09
# Write a function that takes in N numbers as parameters representing marks obtained in quizzes. The function should calculate and return the average of best N-1 marks. Use variable length argument list.
def average_best(N, *marks):
# Sort the marks in descending order
sorted_marks = sorted(marks, reverse=True)
# Get the top N-1 marks
top_marks = sorted_marks[: N - 1]
# Calculate the average of the top marks
return sum(top_marks) / len(top_marks)
def gpa(*subs_nums):
totalGpa = 0
for num in subs_nums:
if num >= 90 and num <= 100:
totalGpa += 4
elif num >= 85 and num <= 89:
totalGpa += 3.70
elif num >= 80 and num <= 84:
totalGpa += 3.30
elif num >= 75 and num <= 79:
n = int(input("Enter any Real number: "))
for i in range(n):
for j in range(i + 1):
print("*", end=" ")
print()
# Result:
# *
# * *
# Assignment 01: Take a floating number as input and print it in integer.
floatingNumber = float(input("Enter a floating number: "))
print(int(floatingNumber))
# Assignment 02: Print decimal number with the fixed decimal part. (up to 2 decimal places or 3 decimal places)
sampleNumber = 2.44922343556
print("The number is: ", sampleNumber)
print("The 2 decimal number is: ", round(sampleNumber, 2))
department1 = "CSE"
department2 = "CIVIL"
institution1 = "IUB"
institution2 = "NSU"
myInstitution = input("Enter your institution name: ")
myDepartment = input("Enter your department: ")
# Methon 01 - Straight forward