Skip to content

Instantly share code, notes, and snippets.

View nkpro2000sr's full-sized avatar
🤔
Developing my project

NAVEEN S R nkpro2000sr

🤔
Developing my project
View GitHub Profile
@nkpro2000sr
nkpro2000sr / kivy_buildozer_colab.ipynb
Last active March 29, 2023 13:15
colab with python, kivy, buildozer. To build apps easily online, no need to download SDK, NDK, ... 😩
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nkpro2000sr
nkpro2000sr / nouip.sh
Created September 14, 2021 11:53
To submit a dynamic dns update request from shell. https://www.noip.com/ (To update IP of HOSTNAME, update will happen instantly)
# {NO,Updatemy}IP
# https://www.noip.com/integrate/request
nouip ()
{
USER=""
PASSWORD=""
HOSTNAME=""
IP=""
@nkpro2000sr
nkpro2000sr / multiTank-multiPowerSource-singleMotor.png
Last active May 17, 2021 19:30
To pump water from a motor to multiple water tanks with different power source (Energy meter) respectively.
multiTank-multiPowerSource-singleMotor.png
@nkpro2000sr
nkpro2000sr / code.dpyt
Created March 21, 2021 19:45
Polyglot (Python & Dart) template
str ({format:#py, code:"""
'python'})
<< PYTHON Code without triple double quote >>
"""}){#dart;}
<< DART Code without triple double quote >>
//"""
@nkpro2000sr
nkpro2000sr / YT-Download.py
Last active March 21, 2021 11:54
To Download Videos from your youtube private playlist.
import pafy # pip install pafy youtube-dl
def download(video_ids, video=True, audio=False):
"""To download the videos from playlist
Args:-
video_ids : list(str) = List of video ids has to be downloaded
video : bool = Enable to download video
audio : bool = Enable to download audio
"""
for i, video_id in enumerate(video_ids):
@nkpro2000sr
nkpro2000sr / build_tf_src_colab.ipynb
Last active September 10, 2020 10:05
To build TensorFlow from source in colab
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nkpro2000sr
nkpro2000sr / ToDownload.ipynb
Last active August 26, 2020 21:57
To download large files directly into google drive (later we can split and download)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nkpro2000sr
nkpro2000sr / terminalist.sh
Last active August 1, 2020 14:04
list of useful cammands and alias for terminal.
curl -s "http://worldtimeapi.org/api/timezone/Asia/Kolkata" | cut -d'"' -f34 # alternative to `date`
curl -s ifconfig.co/json | jq # to find your public IP
perl -nle 'print $& while m/[[:print:]]{4,}/g' binary_input # perl version of strings command
curl -L bit.ly/setup-pyenv | sh # to setup pyenv as py
curl -L bit.ly/setup-brew | sh # to setup brew
alias pi='ping 8.8.8.8 | less +F' # ^c + q to exit
alias br='sudo nano /sys/class/backlight/*/brightness' # to change brightness
alias dt='date +"%d[%a]/%m[%b]/%Y %H[%I%p]:%M:%S"' # just Date and Time
alias lslck='sudo ls /var/lib/*/*.lck' # to list all locks
@nkpro2000sr
nkpro2000sr / setattr_after_timeout.py
Created June 22, 2020 20:47
To set/change value after timeout using Thread.
class _Setattr_after_timeout(threading.Timer):
""" To set values after timeout to attribute of a object """
def __init__(self, timeout, obj, **attrsAvalue):
"""
Args:
timeout (int):
Time (in seconds) after which value should be set to attribute of obj.
obj (object):
Object whose attributes have to set