Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Abdul Rehman abdul-rehman-2050

🎯
Focusing
View GitHub Profile
@abdul-rehman-2050
abdul-rehman-2050 / basicvue.html
Last active Nov 17, 2021
vue templates for vue3
View basicvue.html
<!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 Mar 7, 2021
STM32F103RB Nucleo board STD Peripheral library examples
View MotorControl.c
#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 Jan 18, 2021
DS18b20 Temperature sensor interfacing with ESP8266
View DS18b20_esp8266.ino
/*
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 Jan 14, 2021
Arduino LM35 based Temperature Meter with Celcius and Farnheight temperature output on Serial Terminal and 16x2 LCD
View lm35_arduino_lcd.ino
/*
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 Feb 29, 2020
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.
View sevensegment_ex01.vhdl
----------------------------------------------------------------------------------
-- 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 Jul 15, 2021
histogram equalization via matlab from scratch
View im2imhisteq.m
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 Oct 6, 2019 — forked from edubey/bag-of-word-vectors.py
Code to generate bag of word vectors in Python
View bag-of-word-vectors.py
# 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 Nov 28, 2018
view pdf files in google drive
View WebviewPDFActivity.kt
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() {
View frequencyCoutnerArduino.ino
// 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
{
View 8051_16x2_LCD_EX01.asm
;====================================
; @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
;====================================