Skip to content

Instantly share code, notes, and snippets.

View ehzawad's full-sized avatar
🎃
Wasteland Baby!

Emrul Hasan Zawad ehzawad

🎃
Wasteland Baby!
View GitHub Profile
@ehzawad
ehzawad / Activate Office 2019 for macOS VoL.md
Last active July 4, 2021 21:20 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file
@ehzawad
ehzawad / min-char-rnn.py
Created August 23, 2020 23:28 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ehzawad
ehzawad / docker-help.md
Created November 15, 2018 16:23 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@ehzawad
ehzawad / Install_React_Native_Android_on_Ubuntu.md
Created June 14, 2017 17:45 — forked from eon01/Install_React_Native_Android_on_Ubuntu.md
Steps for getting a working Linux install for React Native Android

Installing React Native Android on Ubuntu

Here are the steps for getting a working Linux install for React Native:

  1. Install Java SDK
  1. Install KVM
    • sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
    • sudo adduser $USER libvirtd
@ehzawad
ehzawad / a2dp.py
Created June 1, 2017 08:03 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
@ehzawad
ehzawad / result_checker.py
Last active May 6, 2017 17:47 — forked from SohanChy/result_checker.py
A python script to periodically check if SSC results been published or not
from urllib.parse import urlencode
from urllib.request import Request, urlopen
from os import popen
import threading
def check_result():
"""A python script to periodically check if SSC resulthas been published or not"""
timer = 5.0 #seconds
print("checking...")
@ehzawad
ehzawad / Animation.jsx
Created March 6, 2017 21:25 — forked from tkh44/Animation.jsx
react-router v4 animated with data-driven-motion
import React from 'react'
import { BrowserRouter as Router, Route, Link, Redirect, matchPath } from 'react-router-dom'
import { Motion } from 'data-driven-motion' // https://github.com/tkh44/data-driven-motion
const WOBBLY_SPRING = { stiffness: 200, damping: 15, precision: 0.1 }
const AnimationExample = () => (
<Router>
<div>
<ul>
@ehzawad
ehzawad / beautiful_idiomatic_python.md
Created January 6, 2017 16:48 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@ehzawad
ehzawad / .gdbinit
Created October 3, 2016 16:42 — forked from skyscribe/.gdbinit
GDB init file to print STL containers and data members
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@ehzawad
ehzawad / slim-redux.js
Created May 24, 2016 11:05 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {