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 <cstring> | |
| #ifdef _WIN32 | |
| #include <Windows.h> | |
| #else | |
| #include <unistd.h> | |
| #endif | |
| #define MB (1024*1024) | |
| 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
| """c_print.py: Enable coloured print.""" | |
| __author__ = "Muhammad Umer Farooq" | |
| __license__ = "MIT" | |
| __version__ = "1.0.0" | |
| __maintainer__ = "Muhammad Umer Farooq" | |
| __email__ = "[email protected]" | |
| __status__ = "Production" | |
| def c_print(msg, color=None): |
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
| """ddos_attack.py: A python script to DDoS attack to any server.""" | |
| __author__ = "Muhammad Umer Farooq" | |
| __license__ = "MIT" | |
| __version__ = "1.0.0" | |
| __maintainer__ = "Muhammad Umer Farooq" | |
| __email__ = "[email protected]" | |
| __status__ = "Production" | |
| """ | |
| DDoS: https://en.wikipedia.org/wiki/Denial-of-service_attack | |
| Caution: i will not accept any illegal usage of this script, this is |
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
| def gcd(a, b): | |
| return a if b == 0 else gcd(b, a % b) | |
| print(gcd(int(input("Enter value of a: ")), int(input("Enter value of b: ")))) |
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
| <VirtualHost *:80> | |
| ServerName git.muhammadumerfarooq.com | |
| <Proxy *> | |
| Order allow,deny | |
| Allow from all | |
| </Proxy> | |
| SetEnv proxy-sendcl | |
| ProxyPreserveHost On | |
| ProxyPass /git http://127.0.0.1:3000/ |
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
| INTEGER, PLUS, MINUS, MULTIPLY, DIV, EOF = 'INTEGER', 'PLUS', 'MINUS', 'MULTIPLY', 'DIV', 'EOF' | |
| class Token(): | |
| def __init__(self, type, value): | |
| self.type = type | |
| self.value = value | |
| def __str__(self): | |
| return 'Token({type}, {value})'.format( |
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
| class Range: | |
| def __init__(self, start, stop=None, step=1): | |
| if step == 0: | |
| raise ValueError("Step can not be zero.") | |
| if stop is None: | |
| start, stop = 0, start | |
| # calculate the effective length once | |
| self.length = max(0, ((stop - start) + (step - 1)) // step) |
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
| // | |
| // Created by lablnet on 10/14/20. | |
| // | |
| #include <iostream> | |
| // we can use C++ vector to make it dynamic size but that was not requirement. | |
| struct Weather { | |
| float totalRainFall[6]; | |
| float temp[6]; | |
| float lowTemp[6]; |
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 'dart:async'; | |
| Future longRunningOperation() async { | |
| for (int i = 0; i < 5; i++) { | |
| await Future.delayed(Duration(seconds: 1)); | |
| print("index: $i"); | |
| } | |
| } | |
| 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
| def _to_lower(text: str) -> str: | |
| upper = "" | |
| for i in text: | |
| if 65 <= ord(i) <= 90: | |
| upper += chr(ord(i) + 32) | |
| else: | |
| upper += i | |
| return upper |