Skip to content

Instantly share code, notes, and snippets.

View jishanshaikh4's full-sized avatar
🌿

Jishan Shaikh jishanshaikh4

🌿
View GitHub Profile

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

“Fools ignore complexity; pragmatists suffer it; experts avoid it; geniuses remove it.”

– Alan Perlis (Turing Award #1, ALGOL)


“Computer Science is the first engineering discipline in which the complexity of the objects created is limited solely by the skill of the creator, and not by the strength of raw materials.”

import math
from moviepy.editor import concatenate, ImageClip
import os
import platform
import subprocess
import random
import torch
# pip install pytorch-pretrained-biggan
from pytorch_pretrained_biggan import (BigGAN, truncated_noise_sample, convert_to_images)
import numpy as np
@jishanshaikh4
jishanshaikh4 / torhasher.py
Created May 17, 2022 07:20 — forked from james-see/torhasher.py
create a hashed password for control port setting in torrc HashedControlPassword line easily with this (python2)
import os, binascii, hashlib
#supply password
secret = 'your password here you want to use' # all you need to change!
#static 'count' value later referenced as "c"
indicator = chr(96)
#used to generate salt
rng = os.urandom
@jishanshaikh4
jishanshaikh4 / ConfirmDialog.tsx
Last active May 26, 2022 21:12 — forked from lucivaldo/ConfirmDialog.tsx
Provider to provide confirmation dialog functionality globally in React applications (not tested)
import { faCheck, faTimes, faWarning } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
Box,
Button,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
Backdrop,
@jishanshaikh4
jishanshaikh4 / currency-code.ts
Created June 15, 2022 03:48 — forked from g4rcez/currency-code.ts
Typing the locale and currency in NumberFormat
// https://www.currency-iso.org/dam/downloads/lists/list_one.xml
export type CurrencyCode =
| "AFN"
| "EUR"
| "ALL"
| "DZD"
| "USD"
| "EUR"
| "AOA"
| "XCD"
@jishanshaikh4
jishanshaikh4 / tailwind-webpack-setup.md
Created June 15, 2022 03:50 — forked from bradtraversy/tailwind-webpack-setup.md
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.

@jishanshaikh4
jishanshaikh4 / regex.md
Last active June 15, 2022 17:50 — forked from cobalt88/Regex URL.md
an example of cmmmon reget
@jishanshaikh4
jishanshaikh4 / promise_monad.md
Created June 19, 2022 19:37 — forked from VictorTaelin/promise_monad.md
async/await is just the do-notation of the Promise monad

async/await is just the do-notation of the Promise monad

CertSimple just wrote a blog post arguing ES2017's async/await was the best thing to happen with JavaScript. I wholeheartedly agree.

In short, one of the (few?) good things about JavaScript used to be how well it handled asynchronous requests. This was mostly thanks to its Scheme-inherited implementation of functions and closures. That, though, was also one of its worst faults, because it led to the "callback hell", an seemingly unavoidable pattern that made highly asynchronous JS code almost unreadable. Many solutions attempted to solve that, but most failed. Promises almost did it, but failed too. Finally, async/await is here and, combined with Promises, it solves the problem for good. On this post, I'll explain why that is the case and trace a link between promises, async/await, the do-notation and monads.

First, let's illustrate the 3 styles by implementing

@jishanshaikh4
jishanshaikh4 / npm-packages.md
Last active June 25, 2022 02:18 — forked from NyashaNziramasanga/npm-packages.md
Common NPM packages - Reference

Useful Node Packages

List of useful node packages

A Node Web framework

npm i express --save