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
| """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
| """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
| #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
| #include <iostream> | |
| #include <chrono> | |
| using namespace std; | |
| bool isPrime(long long int); | |
| int main(){ | |
| long long int n=0; | |
| cout<<"Enter number"<<endl; | |
| cin>>n; | |
| auto start=chrono::high_resolution_clock::now(); |
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<fstream> | |
| using namespace std; | |
| // define a structure to store student data | |
| struct student { | |
| int sapid; | |
| char name[30]; | |
| float marks; | |
| void getData(); // get student data from user | |
| void displayData(); // display 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 | Ali | 230 | |
|---|---|---|---|
| 5 | Bilal | 255 | |
| 6 | Pasha | 430 |
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
| //usr/bin/g++ | |
| #include <iostream> | |
| int main() { | |
| const int S = 5, M = 6, max = 1000; | |
| int subjects[S][M], avg[S], sum = 0; | |
| char students[S][max]; | |
| // Read the mark for students. | |
| for (int i = 0; i < S; 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> | |
| using namespace std; | |
| namespace lablnet { | |
| bool is_prime(int n) | |
| { | |
| bool isPrime = true; | |
| for (int i = n - 1; i >= 2; i--) | |
| { | |
| if (n % i == 0) |
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
| <?php | |
| if (isset($_POST['submit'])) { | |
| $text = (null !== empty(trim($_POST['text']))) ? stripslashes(trim(htmlentities(htmlspecialchars(strip_tags($_POST['text']), ENT_QUOTES | ENT_HTML5, 'UTF-8'), ENT_QUOTES | ENT_HTML5, 'UTF-8'))) : ''; | |
| if ('' !== $text) { | |
| $spilt = explode(' ', $text); | |
| echo "<strong>Counts:</strong><br/ >"; | |
| foreach (array_unique($spilt) as $key => $value) { | |
| $count = substr_count($text, $value); | |
| echo "<b>$value:</b> <i>$count</i> <br>"; |