- by https://social.wyrd.systems/@matt - please contact me if this is broken
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 | |
import datetime | |
import bs4 | |
import subprocess | |
def loans_list(): | |
now = datetime.datetime.now() | |
logIn_url = "https://eastsussex.spydus.co.uk/cgi-bin/spydus.exe/PGM/WPAC/CCOPT/LB/2" | |
my_account = "https://eastsussex.spydus.co.uk/cgi-bin/spydus.exe/PGM/WPAC/CCOPT/LB/1" | |
card_number = YOUR_CARD_NUMBER |
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 xml.etree.ElementTree as ET | |
import string | |
def make_accessible_from_xml(xml_file): | |
"""Takes a Crossword Compiler xml file and returns a dict of blanks per line, plus a list of across clues and a list of down clues""" | |
# This will give you the data you need to produce a text-only version of a crossword, | |
# which you can use to make something like the Guardian does: https://www.theguardian.com/crosswords/accessible/cryptic/28323 |
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 | |
import folium | |
m = folium.Map(location=[39.376591, -106.942281]) # obviously insert whatever co-ordinates you want | |
key = YOUR_API_KEY | |
home_budget_id = YOUR_BUDGET_ID | |
base_url = 'https://api.youneedabudget.com/v1' | |
headers = {"Authorization": key} |
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, bs4 | |
from send_an_email import send_html_email | |
email_recipient = YOUR_EMAIL_ADDRESS | |
headline_file = PATH_TO_FILE # e.g bvuk_headline.txt | |
url = 'https://www.blindveterans.org.uk/articles' | |
already_got = [] | |
with open(headline_file) as file_object: |
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
var Masto = require('mastodon'); | |
var FeedSub = require('feedsub'); | |
var striptags = require('striptags'); | |
var M = new Masto({ | |
access_token: 'YOUR ACCESS TOKEN', | |
timeout_ms: 60*1000, // optional HTTP request timeout to apply to all requests. | |
api_url: 'https://mastodon.social/api/v1/', // optional, defaults to https://mastodon.social/api/v1/ put your own in obvs | |
}); |
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
// You'll need node.js installed: https://nodejs.org/en/ | |
//To run, type "node postcode.js YOUR_POSTCODE" | |
// Doesn't seem to matter if you have the space in the postcode or not, or if it's in capitals | |
//Retrieve postcode from user input | |
var postcode = process.argv.slice(2); | |
//Create the getLatLong function | |
var getLatLong = function(postcode){ |