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
// https://gist.github.com/walidamriou/1e759043d66340f9c76c7d13b6abf55e | |
#include <Arduino.h> | |
#include <Wire.h> | |
void setup() | |
{ | |
Wire.begin(); | |
Serial.begin(9600); | |
while (!Serial); |
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
// https://github.com/adafruit/Adafruit_SH110x | |
// https://github.com/adafruit/Adafruit-GFX-Library | |
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SH110X.h> | |
#include "DHT.h" | |
#define i2c_Address 0x3c |
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
# Telegram auto file forwarding using pyrogram | |
# pip3 install pyrogram | |
from pyrogram import Client, filters | |
FROM = [-10012345, -10012345] | |
TO = -100133 | |
PYRO_SESSION = "" | |
API_ID = 1234 | |
API_HASH = "abcd1234edfghijkl" |
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
const axios = require('axios'); | |
const cheerio = require('cheerio'); | |
const Asena = require('../events'); | |
const {MessageType} = require('@adiwajshing/baileys'); | |
Asena.addCommand({pattern: 'covid', fromMe: false}, (async (message, match) => { | |
const url = 'https://dashboard.kerala.gov.in/'; | |
axios(url).then(async (response) => { | |
let html = response.data; |
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
count = 0 | |
async for member in client.iter_chat_members("cwpsupport"): | |
if member.user.is_deleted: | |
await client.kick_chat_member("cwpsupport", member.user.id) | |
count = count + 1 | |
print(f"Kicked {count} deleted accounts") |
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 requests | |
session = requests.Session() | |
headers = { | |
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36", | |
} | |
prog_hash = "0876c3e0ffeb11ea93fe33a0b5128807" | |
api_url = f"https://prod.media.jio.com/apis/common/v3/metamore/get/" + prog_hash | |
response = session.get(api_url, headers=headers, cookies=session.cookies) | |
data = response.json() | |
print(data) |
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
1 - CREATE TABLE Employee (E_id INT NOT NULL, Ename VARCHAR(20) NOT NULL, job VARCHAR(20) NOT NULL, designation VARCHAR(30) NOT NULL, salary INT NOT NULL, joining_date VARCHAR(15) NOT NULL); | |
INSERT INTO Employee (E_id, Ename, job, designation, salary, joining_date ) VALUES (1, "Arun 1", "Job name 1", "des 1", 40000, "17-09-2020"), | |
(2, "Arun 2", "Job name 2", "des 2", 30000, "10-09-2020"), | |
(3, "Arun 3", "Job name 3", "des 3", 40000, "06-08-2020"), | |
(4, "Arun 4", "Job name 4", "des 4", 25000, "1-03-2020"); | |
2 - SELECT MAX(salary), AVG(salary) FROM Employee; | |
3 - SELECT Ename FROM Employee; |
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
#include<iostream.h> | |
class LS { | |
public: void linear_search(); | |
}; | |
void main() { | |
LS obj; | |
obj.linear_search(); |
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
#include <iostream> | |
using namespace std; | |
int arr_len; | |
int values, i, sorted; | |
int sort(int[], int); | |
int main() { | |
cout << "Enter the length of the array: "; | |
cin >> arr_len; | |
int arr[arr_len]; |
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
// Linear Searching | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int size,i,ser; | |
cout << "Enter the size of the array: "; | |
cin >> size; | |
int arr[size]; |
NewerOlder