Skip to content

Instantly share code, notes, and snippets.

View himanshuxd's full-sized avatar
🦇

Himanshu S himanshuxd

🦇
View GitHub Profile
@himanshuxd
himanshuxd / OpenWithSublimeText3.bat
Created July 13, 2018 06:43 — forked from PieterScheffers/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
alias ll='ls -alF'
alias l='ls -alF'
alias c='clear'
alias .='echo $PWD'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
@himanshuxd
himanshuxd / octave_ubu_ins.sh
Created August 16, 2018 23:39
ubuntu_octave_install.sh
sudo add-apt-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave
/msg NickServ INFO desired_username
/msg NickServ REGISTER password your_email@domain.com
#!/bin/bash
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"
else
# Download the exploit
curl -s https://raw.githubusercontent.com/dirtycow/dirtycow.github.io/master/dirtyc0w.c > dirtyc0w.c
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@himanshuxd
himanshuxd / Neuron.py
Created January 19, 2019 03:24
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
@himanshuxd
himanshuxd / pip_install.py
Created February 23, 2019 18:06
All the ML pip installs you need
py -m pip install opencv-python numpy scipy pandas matplotlib