Skip to content

Instantly share code, notes, and snippets.

Working from home

mak iamaamir

Working from home
View GitHub Profile
View betterTypeof.js
function betterTypeOf (obj) {
return, -1).toLowerCase();
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pandas_datareader as web
import datetime as dt
from sklearn.preprocessing import MinMaxScaler
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout,LSTM
View 🕒 Recent Public Activities
🗣 Commented on #1 in mtmeyer/figma-react-hooks
❗️ Opened issue #1889 in evanw/esbuild
❌ Closed PR #20 in serverwentdown/file-manager
🗣 Commented on #20 in serverwentdown/file-manager
💪 Opened PR #22 in serverwentdown/file-manager
View Email_Signature.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""><html style="width:100%;font-family:helvetica, 'helvetica neue', arial, verdana, sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;padding:0;Margin:0;"><head><meta content="width=device-width, initial-scale=1" name="viewport"><meta charset="UTF-8"><meta name="x-apple-disable-message-reformatting"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="telephone=no" name="format-detection"><title>Email Signature</title> <!--[if (mso 16)]><style type="text/css"> a {text-decoration: none;} </style><![endif]--> <!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]--> <!--[if !mso]><!-- --><link href=",400i,700,700i" rel="stylesheet"> <!--<![endif]--><style type="text/css">
@media only screen and (max-width:600px) {p, ul li, ol li, a { font-size:16px!important; line-height:200%!importa
iamaamir / index.html
Created May 31, 2020
basic login form
View index.html
<link rel="stylesheet" href="style.css" />
<script src='script.js'></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html style="width:100%;font-family:helvetica, 'helvetica neue', arial, verdana, sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;padding:0;Margin:0;">
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta name="x-apple-disable-message-reformatting">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="telephone=no" name="format-detection">
<title>AKSHAY TRITIYA 2</title>
<!--[if (mso 16)]>
View SamsungPlayer.js
import React, { useEffect } from 'react';
import ReactJWPlayer from 'react-jw-player';
import { playerScript } from 'config';
// import { Analytics } from "functions/utils/Analytics";
import { buildArtimediaParams } from 'functions/helpers/artimedia';
import { dispatchGalaxyEvent } from './PlayerAnalytics';
import useEvtListener from 'functions/hooks/useEvtListener';
github @iamaamir
iamaamir / stringCompress.js
Created Feb 3, 2020
simplest string compression in js
View stringCompress.js
function en(c){var x='charCodeAt',b,e={},f=c.split(""),d=[],a=f[0],g=256;for(b=1;b<f.length;b++)c=f[b],null!=e[a+c]?a+=c:(d.push(1<a.length?e[a]:a[x](0)),e[a+c]=g,g++,a=c);d.push(1<a.length?e[a]:a[x](0));for(b=0;b<d.length;b++)d[b]=String.fromCharCode(d[b]);return d.join("")}
function de(b){var a,e={},d=b.split(""),c=f=d[0],g=[c],h=o=256;for(b=1;b<d.length;b++)a=d[b].charCodeAt(0),a=h>a?d[b]:e[a]?e[a]:f+c,g.push(a),c=a.charAt(0),e[o]=f+c,o++,f=a;return g.join("")}
var compressed=en(" - Simple Packer/Minify/Compress JavaScript Minify, Fixify & Prettify 75 JS Obfuscators In 1 App 25 JS Compressors (Gzip, Bzip, LZMA, etc) PHP, HTML & JS Packers In 1 App PHP Source Code Packers Text Packer HTML Packer or v2 or v3 or LZW Twitter Compress or More Words DNA & Base64 Packer (freq tool) or v2 JS JavaScript Code Golfer Encode Between Quotes Decode Almost Anything Password Protect Scripts HTML Minifier v2 or En
View Reduce in action
// Sum Numbers over an array
const sum = array => array.reduce((acum, number) => {
return acum + number;
}, 0);
console.log('01', { sum: sum([ 1, 5, 9 ]) });
// Sum Numbers multiplied by a factor
const sumProduct = array => array.reduce((acum, pair) => {
const [ number, factor ] = pair;
View useInfiniteScroll.js
import { useEffect, useState } from 'react';
// this func do not cover all the cases
function debounce(func, wait = 100) {
let timeout;
return function(...args) {
timeout = setTimeout(() => {
func.apply(this, args);
}, wait);