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 <iostream> | |
#include <string> | |
using namespace std; | |
int counter = 0; | |
void insert(string names[], string phoneNumbers[], string name, string number) { | |
names[counter] = name; | |
phoneNumbers[counter] = number; | |
counter += 1; |
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
; Sum of the members of a array | |
; Author: Arsalan sefidgar | |
STACK_SEG segment para stack 'stack' | |
db 64 dup('stack ') | |
STACK_SEG ends | |
DATA_SEG segment para 'data' | |
array db 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 | |
sum db 0 |
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 <iostream> | |
#include <conio.h> | |
using namespace std; | |
// Mohit | |
int circumference(int length, int width) { | |
return (length + width) * 2; | |
} | |
// Masahat |
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
# You’re trying to build an IoT mesh network. | |
# Signals can only travel the maximum of 5 units. | |
# You’re given coordinates for the switch, the light, and the mesh hubs (which capture and forward signals). | |
# Return true if the switch can successfully toggle the light. | |
# Example: | |
# let network = { switch: [0,1], hub: [[2,1], [2,5]], light: [1,6] } | |
# $ canToggle(network) | |
# $ 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
close all; | |
clear; | |
clc; | |
size = input('Enter size: '); | |
numbers = zeros(2, size); | |
result = [0, 0]; | |
for i = 1:size |
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 | |
# install tmux ttyd curl torsocks jq ngrok htop | |
tmux new -d -s ttyd './ttyd.x86_64 -p 8080 -m 1 -R htop' | |
tmux split-window -h | |
tmux send-keys "./ngrok-stable-linux-amd64/ngrok http 8080 -region=ap" C-m | |
sleep 3 | |
TELEGRAM_TOKEN="" # fill here | |
TELEGRAM_ID="" # fill here |
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
ssh -qCL 8080:localhost:8080 root@iran-bridge-ip-address -t ssh -qCND localhost:8080 root@free-world-ip-address |
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
import jdatetime | |
import requests | |
import schedule | |
import time | |
import csv | |
GROUP_ID = '' | |
BOT_TOKEN = '' | |
BASE_URL = f'https://api.telegram.org/bot{BOT_TOKEN}/sendMessage?chat_id={GROUP_ID}&text=' |
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
import requests | |
import subprocess | |
GROUP_ID = '' | |
BOT_TOKEN = '' | |
BASE_URL = f'https://api.telegram.org/bot{BOT_TOKEN}/sendMessage?chat_id={GROUP_ID}&text=' | |
docker_ps = "echo -n <password> | sudo docker ps --format '{{.Status}}' | awk '{print $1}'" | |
docker_stats = "sudo docker stats --all --no-stream --format 'table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}'" |
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
import json | |
import csv | |
import os | |
EXCLUDE_FILES = ["json.zip", "main.py", "results.csv"] | |
PATH = "/" | |
KEY_WORD = "go2tr" | |
counter = 0 | |
with open("results.csv", 'w') as result_file: |
OlderNewer