Skip to content

Instantly share code, notes, and snippets.

View Zerk123's full-sized avatar

Zerk Shaban Zerk123

  • Software Engineer @ Arrivy Inc.
  • Lahore, Pakistan
View GitHub Profile
@Zerk123
Zerk123 / AESCipher.py
Created September 19, 2018 05:30 — forked from swinton/AESCipher.py
Encrypt & Decrypt using PyCrypto AES 256 From http://stackoverflow.com/a/12525165/119849
#!/usr/bin/env python
import base64
from Crypto import Random
from Crypto.Cipher import AES
BS = 16
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
unpad = lambda s : s[0:-ord(s[-1])]
@Zerk123
Zerk123 / Complain.php
Created May 30, 2018 17:43
Online Tutor Website
<!DOCTYPE html>
<html lang="en">
<!-- Mirrored from ustadustani.com/contact.php by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 02 Jan 2018 17:19:14 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<title>Submit Complains</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-select.css" rel="stylesheet">
@Zerk123
Zerk123 / AddServer.java
Created April 29, 2018 10:36
Remote Procedure Call (RPC)
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
public class AddServer {
public static void main(String[] args) {
// TODO Auto-generated method stub
@Zerk123
Zerk123 / PredictGoal.py
Created October 31, 2017 15:20
Predicting goal using Linear Regression or Support Vector Machine
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 31 18:30:51 2017
@author: Zerk Shaban
"""
import pandas as pd
import math
import numpy as np
@Zerk123
Zerk123 / PredictGoal.py
Created October 31, 2017 15:19
Predicting goal using Linear Regression or Support Vector Machine
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 31 18:30:51 2017
@author: Zerk Shaban
"""
import pandas as pd
import math
import numpy as np
@Zerk123
Zerk123 / ds.py
Created August 31, 2017 12:31
Python Data Structures
import pandas as pd
import datetime
import pandas_datareader.data as web
import matplotlib.pyplot as plt
import numpy as np
from numpy import nan as NA
#PANDAS
#PANDAS Data Structures
#Series
obj = pd.Series([2,4,6,7,8])
@Zerk123
Zerk123 / Edit.php
Created May 11, 2017 20:14
QuickShare Beta version of Social networking website
<?php
session_start();
$a=mysqli_connect("localhost","root","","members");
if(isset($_POST['update'])){
$username=$_POST['username'];
$password=$_POST['password'];
$query1="select id from users where name='$username'";
$result=mysqli_query($a,$query1);
@Zerk123
Zerk123 / sawarq.cpp
Last active August 27, 2018 14:22
Stop-And-Wait Protocol ARQ
#include<iostream>
#include<windows.h>
#include<time.h>
#define Index 5
using namespace std;
struct Data {
int dataFrame;
@Zerk123
Zerk123 / project.mat
Created December 1, 2016 07:57
Car Detection From an Image using SURF(Speeded Up Robust Feature) Matlab
% Team Owais, Zerk, Shaleem, Faisal, Farman
% Accuracy 0.9472 (94%)
% Uses bag of features for training.
% Path to data-set folder
path = 'data-set';
imgSets = imageSet(path, 'recursive');
% Partition our data to 30/70, Where 30% data is for training and 70 for
% test set. Increasing training set will increase accuracy.
@Zerk123
Zerk123 / sawp.cpp
Last active November 27, 2016 18:59
Stop-And-Wait Protocol
#include<iostream>
#include<windows.h>
using namespace std;
struct Data{
int dataFrame;
int dataRecieved;
int extractedDatavar;