Skip to content

Instantly share code, notes, and snippets.

View irfanm96's full-sized avatar
🏠
Working from home

Mohamed Irfan irfanm96

🏠
Working from home
View GitHub Profile
<div {{ $attributes }} wire:ignore x-data="{
signaturePadId: $id('signature'),
signaturePad: null,
signature: @entangle($attributes->get('wire:model')),
ratio: null,
init() {
this.resizeCanvas();
this.signaturePad = new SignaturePad(this.$refs.canvas);
if (this.signature) {
this.signaturePad.fromDataURL(this.signature, { ratio: this.ratio });
@irfanm96
irfanm96 / preview-final-data.csv
Created January 14, 2021 14:58
Head Pose estimation data after labelling
yaw roll pitch face_count actual
12.364563 4.4611955 -2.2596376 1 0
-0.65473247 4.6355453 -2.9849377 1 0
8.143496 -5.6577563 -1.2750092 1 0
3.6348948 2.263096 4.4804964 1 0
1.74849 10.903756 5.6701913 1 0
-3.5862808 -6.6118 0.78078353 1 0
-0.61599874 -5.5254607 -4.5835767 1 0
2.5312912 -1.7103585 7.892634 1 0
2.4771526 -8.922743 -3.0467575 1 0
@irfanm96
irfanm96 / data.csv
Created October 28, 2020 11:47
Dataset obtained by FSA-net for a video stream
timestamp yaw roll pitch
0.0 -6.8209853 -4.089671 -3.5101411
31.0 -8.571986 -3.2114453 -3.0377636
64.0 -7.6618705 -3.205566 -3.4195938
100.0 -6.6073923 -3.5292473 -3.9301777
132.0 -8.624988 -4.015033 -4.109576
195.0 -7.6296415 -3.6469448 -3.9989915
232.0 -8.22754 -3.6215093 -2.8254626
264.0 -9.491012 -2.4362333 -3.176225
295.0 -8.265944 -2.4910977 -3.345761
@irfanm96
irfanm96 / configure-skeleton.sh
Created July 1, 2020 15:13
Extended version of the configure-skeleton.sh ( shell script ) for spatie/package-skeleton-laravel
#!/bin/bash
# 'return' when run as "source <script>" or ". <script>", 'exit' otherwise
[[ "$0" != "${BASH_SOURCE[0]}" ]] && safe_exit="return" || safe_exit="exit"
script_name=$(basename "$0")
ask_question(){
# ask_question <question> <default>
local ANSWER
read -r -p "$1 ($2): " ANSWER
@irfanm96
irfanm96 / New Text Document.txt
Created May 27, 2020 09:42
CO326 LAB 04 Resources
/*******************************************************************************
Copyright 2016 Microchip Technology Inc. (www.microchip.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@irfanm96
irfanm96 / Main.java
Created December 20, 2019 11:34
Java Implementation to evaluate a postfix expression using a stack
import java.util.Stack;
public class Main {
public static void main(String[] args) {
// the driver code
String expression1 = "22*3+";
//should print answer as 7
evaluatePostfix(expression1);
@irfanm96
irfanm96 / SetLocale.php
Created November 16, 2019 04:02
Laravel Localization,Middleware to set locale based on route
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\App;
class SetLocale
{
/**