Skip to content

Instantly share code, notes, and snippets.

View abdul-rehman-2050's full-sized avatar
🎯
Focusing

Abdul Rehman abdul-rehman-2050

🎯
Focusing
View GitHub Profile
@abdul-rehman-2050
abdul-rehman-2050 / basicvue.html
Last active November 17, 2021 03:46
vue templates for vue3
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
@abdul-rehman-2050
abdul-rehman-2050 / MotorControl.c
Last active March 7, 2021 14:06
STM32F103RB Nucleo board STD Peripheral library examples
#include "stm32f10x.h"
#include "stm32f10x_gpio.h"
GPIO_InitTypeDef GPIO_InitStructure;
void delay(__IO unsigned long mval){
int i=0;
for(mval;mval>0;mval--){
for(i=0;i<5000;i++);
}
@abdul-rehman-2050
abdul-rehman-2050 / DS18b20_esp8266.ino
Created January 18, 2021 13:17
DS18b20 Temperature sensor interfacing with ESP8266
/*
Here is the complete tutorial for this code
http://www.fypsolutions.com/examples/ds18b20-interfacing-with-esp8266-nodemcu-board/
*/
#include <DallasTemperature.h>
#include <OneWire.h>
#define ONE_WIRE_BUS D1 //D2 pin of nodemcu
@abdul-rehman-2050
abdul-rehman-2050 / lm35_arduino_lcd.ino
Created January 14, 2021 05:27
Arduino LM35 based Temperature Meter with Celcius and Farnheight temperature output on Serial Terminal and 16x2 LCD
/*
for compelete blog
http://www.fypsolutions.com/arduino/lm35-temperature-sensor-arduino
*/
#include <LiquidCrystal.h>
// Pin Definitions
@abdul-rehman-2050
abdul-rehman-2050 / sevensegment_ex01.vhdl
Created February 29, 2020 08:31
vhdl code for single digit seven segment counter from 0 to 9. Counting is auto incremental mode with the input clock divided to make 500 milliseconds.
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 12:35:24 02/29/2020
-- Design Name:
-- Module Name: sevensegment_ex01 - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
@abdul-rehman-2050
abdul-rehman-2050 / im2imhisteq.m
Last active July 15, 2021 03:46
histogram equalization via matlab from scratch
function new_im = im2imhisteq(I)
% takes an Input Image and
%http://www.osmanoglu.org/supplement/unpublishedWork/DigitalImageProcessing_HistogramEqualizationMatching.pdf
%Manhas, Pratima & Thakral, Shaveta. (2018)...
% Comparative analysis of different wavelet ...
% filters and Image enhancement using Histogram Equalization.
L=256;
[m,n]=size(I);
len=m*n; %number of pixels
@abdul-rehman-2050
abdul-rehman-2050 / bag-of-word-vectors.py
Created October 6, 2019 14:22 — forked from edubey/bag-of-word-vectors.py
Code to generate bag of word vectors in Python
# import statments
import numpy
import re
'''
Tokenize each the sentences, example
Input : "John likes to watch movies. Mary likes movies too"
Ouput : "John","likes","to","watch","movies","Mary","likes","movies","too"
'''
def tokenize(sentences):
@abdul-rehman-2050
abdul-rehman-2050 / WebviewPDFActivity.kt
Created November 28, 2018 19:53
view pdf files in google drive
import android.annotation.SuppressLint
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.webkit.WebView
import android.webkit.WebViewClient
import kotlinx.android.synthetic.main.activity_webview_pdf.*
class WebviewPDFActivity : AppCompatActivity() {
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(6, 7, 10, 11, 12, 13);
int freqCounter = 0;
long preMillis = 0;
void isr() //interrupt service routine
{
;====================================
; @copyright-Abdul Rehman
; @Licence Creative Common
; This code used to display simple character...
; on character lcd with 8051 microcontroller in assembly langauge
;====================================
LCD_DATA_PORT EQU P0
RS BIT P2.0
EN BIT P2.1
;====================================