This file contains hidden or 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
#!/bin/bash | |
## USAGE: | |
## sudo ./bing-wallpaper-download.sh | |
## DESCRIPTION: | |
## Downloads the latest bing wallpaper image to a file path of your choice. | |
## The arguments have been optimized for raspbian distribution | |
## but they can be modified for other distros as well. | |
## Integrate it as cronjob or run it manually everyday. | |
function _check_requirements() { |
This file contains hidden or 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 threading | |
import time | |
import os | |
import sys | |
""" | |
Usage: | |
Run this script and choose device port. (e.g. 'python3 this_script.py /dev/serial0') | |
To execute only one command run "C AT" where AT is the command you want to execute | |
To execute a file with commands run "F Commands.txt 3" where 3 is delay 3 seconds between commands |
This file contains hidden or 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
#!/bin/bash | |
C_BLACK='\033[0;30m' | |
C_RED='\033[0;31m' | |
C_GREEN='\033[0;32m' | |
C_BROWN='\033[0;33m' | |
C_BLUE='\033[0;34m' | |
C_PURPLE='\033[0;35m' | |
C_CYAN='\033[0;36m' | |
C_LIGHT_GRAY='\033[0;37m' |
This file contains hidden or 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
from random import random | |
pi, i = 0, 1 | |
while True: | |
pi, i = pi * (i - 1) / i + (4 / i if random() ** 2 + random() ** 2 < 1 else 0), i + 1 | |
print(end=f"\r{pi}") |