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 # pip install requests | |
| import git # pip install GitPython | |
| import datetime | |
| _bot_token = '' # your bot token | |
| _bot_chat_id = '' # your telegram chat id | |
| _absolute_path_to_git_repo = '' # the absolute path to your repository dir containing .git | |
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
| #!/bin/sh | |
| red=$(tput setaf 1) | |
| green=$(tput setaf 2) | |
| reset=$(tput sgr0) | |
| echo "${red}Uninstalling previous verions...${reset}" && | |
| sudo apt-get remove docker docker-engine docker.io containerd runc -y; | |
| echo "${red}Updating and installing Docker...${reset}" && | |
| sudo apt-get update && | |
| sudo apt-get install \ | |
| apt-transport-https \ |
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 | |
| import time | |
| WEBSITE = "https://amozesh.tabrizu.ac.ir/" | |
| TIMEOUT_DURATION = 45 | |
| while True: | |
| print("Trying to connect..") | |
| try: |
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> | |
| #include <chrono> | |
| void func(const int limit) { | |
| for (int i = 0; i < limit; ++i) { | |
| std::cout << "Test"; | |
| } | |
| } | |
| int main() { |
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 <bits/stdc++.h> | |
| template <typename T> | |
| void print(const std::vector<std::pair<T, T>>& v) { | |
| for (auto i : v) { | |
| std::cout << i.first << ':' << i.second << ' '; | |
| } | |
| std::cout << std::endl; | |
| } |
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> | |
| #include <sstream> | |
| #include <ctime> | |
| #include <random> | |
| void function1(const std::string &element) { | |
| uint32_t count = 0; | |
| std::stringstream ss; | |
| for (uint32_t i = 0; i < element.length(); i += count) { | |
| uint32_t index = i; |
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> | |
| #include <string> | |
| enum Color { | |
| Black, | |
| Blue, | |
| Green, | |
| Cyan, | |
| Red, |