Skip to content

Instantly share code, notes, and snippets.

View iamareebjamal's full-sized avatar
🌐
Existing

Areeb Jamal iamareebjamal

🌐
Existing
View GitHub Profile
@iamareebjamal
iamareebjamal / attendance.py
Created July 23, 2015 08:28
Python Script to see attendance of AMU B.Tech students by providing Faculty Number.
import requests
from bs4 import BeautifulSoup
fac_no = input('Enter Faculty Number:')
data = {'faculty_number' : fac_no, 'submit' : 'submit'}
page = requests.post('http://ctengg.amu.ac.in/student_wise_attendance.php', data)
attendance = BeautifulSoup(page.text).findAll('table')[0]
index = attendance.text.find('Name') + len('Name')
@iamareebjamal
iamareebjamal / device_info_settings.xml
Last active December 20, 2015 06:49
Method to add custom image in About phone Section of Settings.apk
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
xmlns:android="http://schemas.android.com/apk/res/android">
<Preference android:title="@string/model_number" android:key="device_model" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/firmware_version" android:key="firmware_version" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/build_number" android:key="build_number" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/baseband_version" android:key="baseband_version" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/kernel_version" android:key="kernel_version" android:summary="@string/device_info_default" style="?android:preferenceIn
@iamareebjamal
iamareebjamal / Amigho.java
Created December 20, 2015 13:45
An extremely lolly easy encryption algorithm by Amogh Kulkarni
import java.util.*;
public class Amigho
{
public static boolean isUpper(char c){
return (c>='A'&&c<='Z');
}
public static boolean isLower(char c){
@iamareebjamal
iamareebjamal / BinarySearch.cpp
Last active January 26, 2016 14:18
Binary Search ALDS Lab
#include <iostream>
#include <vector>
#include <algorithm>
#define tmpl8 template <typename T>
using namespace std;
int binCount = 0;
@iamareebjamal
iamareebjamal / basic_server.js
Last active January 16, 2017 20:39
Basic Node Server to capture images and display in multipart using boundary
/* Node Server
* Captures image and displays them using multipart and boundary headers
* 16th Jan 2016
* Author : Areeb Jamal, Rahul Jha
*/
var fs = require('fs'),
http = require('http'),
express = require('express'),
NodeWebcam = require("node-webcam");
#include <iostream>
#include <stdio.h>
#include <sys/stat.h>
#include "socketreceiver.h"
using namespace std;
int file_exists(string filename) {
struct stat buffer;
return (stat (filename.c_str(), &buffer) == 0);
import time
import hashlib
class Block:
def __init__(self, index, data, previous_hash=None):
self.index = index
self.data = data
self.previous_hash = previous_hash
self.timestamp = time.time()
@iamareebjamal
iamareebjamal / redis-quickstart.sh
Created March 16, 2018 15:54
Redis Quickstart
#!/bin/bash
echo "$(tput setaf 6)$(tput bold)○ Checking Redis...$(tput sgr0)"
# Check if Redis CLI is present
if ! [ -x "$(command -v redis-cli)" ]; then
# If not, provide users an option to download
echo " $(tput setaf 3)$(tput bold)• Redis is not installed or on the path$(tput sgr0)"
read -p " Do you want to install it? $(tput dim)(Y/N)$(tput sgr 0) " prompt
if [[ $prompt =~ [yY] ]]; then
# Check if tools required to download and install redis are present
@iamareebjamal
iamareebjamal / curve_fitting.ipynb
Last active August 31, 2018 20:02
Least Square Non Linear
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.