Skip to content

Instantly share code, notes, and snippets.

View amindadgar's full-sized avatar
🏠
Learning & Working from home

Mohammad Amin Dadgar amindadgar

🏠
Learning & Working from home
View GitHub Profile
@amindadgar
amindadgar / standardScaling.py
Created August 1, 2022 17:12
A simple program to evaluate the zero mean scaling using Sklearn library and manually
from sklearn.preprocessing import StandardScaler
def find_manually(data, mean, var):
"""
scale the data manually using mean(`mean`) and variance (`var`)
"""
return (data - mean) / var
@amindadgar
amindadgar / send to ssh server
Created June 23, 2021 08:03
SSH FILE TRANSFER
# Use scp command to send from client to ssh server
# My os is windows and ssh server is linux
scp F:\myfile.txt root@[root ip]:/etc/myfolder/myfile.opt
@amindadgar
amindadgar / main
Created June 4, 2021 14:47
Get DHCP client list from android hotstpot ( connect using adb )
# you can run this commands for rooted devices
adb tcpip 5555
adb connect 192.168.43.1 # mobile AP IP (Always it is this)
adb shell
cat /data/misc/dhcp/dnsmasq.leases # this command will show a list of connected devices with their ip and mac address