Skip to content

Instantly share code, notes, and snippets.

View Dhruvgera's full-sized avatar
💭
Learning every moment😄

Dhruv Gera Dhruvgera

💭
Learning every moment😄
View GitHub Profile
#!/bin/bash
set -e
trap 'echo_and_log "ERROR" "Script exited unexpectedly on line $LINENO. Last command: $BASH_COMMAND"' ERR
# Repository and version information
REPO_OWNER="hyperspaceai"
REPO_SLUG="aios-cli"
CUDA_VERSION="12.5.1"

Backend Developer Assignment: Uptime Monitor with Discord Notifications

Time Expected: 1-2 days

Project Overview

Build a simple service that monitors website availability and sends notifications through Discord webhooks when a site goes down or recovers.

Core Requirements

  1. Website Monitoring
[
{
"id": 1,
"kernelstring": {
"link": {
"downloadlink": "https://drive.google.com/u/0/uc?id=1xByOfOiw9IdjOu4C5yf9svoAgukky46u&export=download",
"kstring": "4.9.330-Rockstar-v19",
"zipname": "RockstarKernel-POCOPHONE-SE-v19.zip"
}
}
f=open("hellotext.txt",'w')
f.write("Hello World\n")
f.close()
def absolute_value(num):
if num >= 0:
return num
else:
return -num
print(absolute_value(2))
def hellofunction():
print("Hello to functions!")
x = 10
y = 20
x,y = y,x
print(x)
print(y)
n=1
while n==1:
print("Hello everyone!")
n=int(input("DO you want the program to continue? Type 1 for yes or 0 for no"))
print("Out of the loop")
n=int(input("Enter the number till which the sequence should be printed: "))
for i in range(0,n+1):
print(i)
#This will print all the series from 0 to whatever number you specify
public class FirstProgram{
public static void main(String []args){
System.out.println("Hello World!");
}
}