I hereby claim:
- I am romilly on github.
- I am romilly (https://keybase.io/romilly) on keybase.
- I have a public key whose fingerprint is 878A 89AD 2AC2 E315 1E6C 5398 72CA 4FA2 E7CB 6E36
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import feedparser | |
| feed = feedparser.parse('http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml') | |
| print feed['feed']['title'] | |
| print len(feed) | |
| import serial | |
| with serial.Serial('/dev/ttyACM0', 9600, timeout=10) as ser: | |
| while True: | |
| print(ser.readline()) |
I first met APL (A Programming Language) in 1968.
I've always used it a lot, and now I use it every day.
Many developers will never have heard of the language. Many of those that have, either love it (as I do) or hate it.
I think now is the time to explain what APL is, why I use it so often, and why I think that developers should take a look at it.
| import serial | |
| class Talker: | |
| TERMINATOR = '\r'.encode('UTF8') | |
| def __init__(self, timeout=1): | |
| self.serial = serial.Serial('/dev/ttyACM0', 115200, timeout=timeout) | |
| def send(self, text: str): |
| """ | |
| Example for remote control from host via Serial link. | |
| This is the code to run on the Pico. | |
| It sets up the onboard LED and allows you to turn it on or off. | |
| """ | |
| from machine import Pin | |
| # use onboard LED which is controlled by Pin 25 | |
| # on a Pico W the onboad lLED is accessed differently, |
I've moved the journal and code for the 'scope to the Pico Code Project on GitHub.
I've moved the journal and code for fungen to the Pico Code Project on GitHub.
| """ | |
| MicroPython code to read and write from UART1 on the Pico | |
| UART0 is not available as it is used for the REPL. | |
| To test, you can use a 3V3 FTDI cable or similar device that connects a host computer with the Pico. | |
| NB: Make sure it's a 3V3 cable, not a 5V cable, or you could kill your PIco!! | |
| Connect FTDI black to Pico GND. |
| import xml.etree.ElementTree as ET | |
| import html2text | |
| def convert(enex_file_name: str, markdown_file_name: str) -> None: | |
| enex = ET.parse(enex_file_name) | |
| root = enex.getroot() | |
| note = root.find('note') | |
| html = note.find('content').text | |
| text = html2text.html2text(html) |