Skip to content

Instantly share code, notes, and snippets.

View muimota's full-sized avatar

Martin Nadal muimota

  • www.muimota.net
  • Madrid / Linz
View GitHub Profile
@muimota
muimota / stocks.py
Last active July 23, 2016 18:34
Grabs stocks values from Yahoo finance
#[email protected]
#grabs stocks values from Yahoo finance
from lxml import html
import urllib2
#curl -vs https://es.finance.yahoo.com/q?s=ITX.MC 2>/dev/null | xmllint --html --xpath '//*[@id="yfs_l84_itx.mc"]' - 2>/dev/null
def query(symbol):
url = 'http://finance.yahoo.com/quote/{}'.format(symbol.upper())
@muimota
muimota / print.py
Created January 27, 2019 18:02
Print example os escpos printer Citizen S300
#uses python-escpos
#https://github.com/python-escpos/python-escpos
#2019 muimota
from escpos.printer import File
import os
p = File("/dev/usb/lp0")
p.text("Hello World\n")
if os.path.isfile('logo.gif'):