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
dbus-send --session --dest=org.kde.plasmashell --type=method_call /PlasmaShell org.kde.PlasmaShell.evaluateScript 'string: | |
var Desktops = desktops(); | |
for (i=0;i<Desktops.length;i++) { | |
d = Desktops[0]; | |
d.wallpaperPlugin = "org.kde.image"; | |
d.currentConfigGroup = Array("Wallpaper", | |
"org.kde.image", | |
"General"); | |
d.writeConfig("Image", "file:'$1'"); | |
}' |
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 urllib.parse | |
import urllib.request | |
from bs4 import BeautifulSoup | |
from pprint import pprint | |
def urlReader(url): | |
print("") | |
print("fetching data from coinmarketcap.com") | |
req = urllib.request.Request(url) | |
resp = urllib.request.urlopen(req) |
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 requests | |
#specify the api of coinmarketcap | |
url = https://api.coinmarketcap.com/v1/ticker/?convert=EUR&Limit=10 | |
# for every coin we find on the website | |
for coin in requests.get(url).json(): | |
print(coin['name], coin['price_usd’]) |
NewerOlder