Skip to content

Instantly share code, notes, and snippets.

View tonyallan's full-sized avatar

Tony Allan tonyallan

  • Melbourne, Australia
View GitHub Profile
@tonyallan
tonyallan / $README.md
Last active April 2, 2022 15:16
Python 3 update for Peter Norvig's Python Lisp
python3 lispytest.py
python3 lispy.py factorial.lsp

Source pages are:

  • https://norvig.com/lispy.html
  • https://norvig.com/lispy2.html
@tonyallan
tonyallan / stdin-thread-example.py
Last active May 12, 2021 01:18
A Python 3 example of multiple threads including user input
#!python3
import threading
import queue
import time
import fileinput
import sys
@tonyallan
tonyallan / tcp-chat-server.py
Last active April 29, 2021 23:55
Python 3 chat server example using select.select()
#!python3
"""
To use this program, open three or more terminal/console windows
python3 tcp-chat-server.py
in all remaining windows:
nc localhost 5678
OR
@tonyallan
tonyallan / isbn.txt
Created April 24, 2018 06:55
Test data for ISBN-10 and ISBN-13 Check-digit calculator
978-1-4860-1097-4
0 9596129 9 8
978-1-4405-9334-5
1-4405-9334-5
978-0-522-86467-0
0-19-506160-8
0-415-01011-X
3-598-21508-8
3-598-21507-X
3598215088
@tonyallan
tonyallan / isbn.py
Created April 24, 2018 06:52
ISBN-10 and ISBN-13 Check-digit calculator
#!/usr/bin/env python3
"""
https://en.wikipedia.org/wiki/International_Standard_Book_Number
Test values:
978-1-4860-1097-4
0 9596129 9 8
978-1-4405-9334-5
1-4405-9334-5

Keybase proof

I hereby claim:

  • I am tonyallan on github.
  • I am tony_allan (https://keybase.io/tony_allan) on keybase.
  • I have a public key whose fingerprint is 93EE 1E8B 273B B1E5 C175 1AC7 B2CF 5EFB 64D4 0C12

To claim this, I am signing this object: