- Organisation: Digital Impact Alliance (DIAL) at UN Foundation
- DIAL Sub-Org: Pocket Science Lab
- Student: NAVEEN S R
- Social: Email, GitHub & Gitter, LinkedIn
- Project: Circuitpython busio compatibility layer for pslab-python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# {NO,Updatemy}IP | |
# https://www.noip.com/integrate/request | |
nouip () | |
{ | |
USER="" | |
PASSWORD="" | |
HOSTNAME="" | |
IP="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
str ({format:#py, code:""" | |
'python'}) | |
<< PYTHON Code without triple double quote >> | |
"""}){#dart;} | |
<< DART Code without triple double quote >> | |
//""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder