Skip to content

Instantly share code, notes, and snippets.

View audiodude's full-sized avatar

Travis Briggs audiodude

View GitHub Profile
import json
from wp1.custom_tables.us_roads import CustomTable as CT
from wp1.wp10_db import connect as wp10_connect
params = {
'wiki_path':
'US-Roads',
'template':
'us_roads.jinja2',
@audiodude
audiodude / README.md
Last active June 20, 2021 19:22
WP1 Manual Update login tutorial

These are the steps necessary to complete a Manual Update on the WP1 tool now that login is enabled. More information about the tool can be found here

  1. Go to https://wp1.openzim.org and click "Manual Update" or simply go to https://wp1.openzim.org/#/update
  2. You will see the following page, prompting you to log in: screenshot
  3. Click one of the login buttons and a new window with a Wikipedia login page will appear. If you are already logged in to this page, skip this and go to the next step: screenshot
  4. Once you log in to Wikipedia succesfully, you will see a permissions dialog to allow the WP1 Selection Tools (our project name for OAuth) permission to access your account. You'll notice that there are no editing perm
20-07-06 01:46:26 Unhandled Error
Traceback (most recent call last):
File "/Users/tmoney/Dropbox/code/evennia/venv/lib/python3.8/site-packages/twisted/python/log.py", line 103, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/Users/tmoney/Dropbox/code/evennia/venv/lib/python3.8/site-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/Users/tmoney/Dropbox/code/evennia/venv/lib/python3.8/site-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/Users/tmoney/Dropbox/code/evennia/venv/lib/python3.8/site-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
@audiodude
audiodude / adventure.txt
Created December 8, 2019 00:01
Klaak the Kobold
You are Klaak, the leader of a clan of kobolds. For many years, your people have
been persecuted by the higher races. You have a slingshot and a loin cloth.
You walk out of your cave one morning and see that the humans have built a road
through the forest. They are building a town in the heart of the forest. You
decide to join them
> ask humans about town
"What is this place?" you say. "It looks like a big city".
The humans look at each other. "A city? A town? We don't live here!"
@audiodude
audiodude / adventure.txt
Created December 7, 2019 23:53
Henry the King
You are Henry, king of the kingdom of Larion. You have all the wealth and power
you could possibly dream of. One day, your most trusted advisor comes to you
and tells you that a great evil is coming to this land. A being known as the
Dark Lord has been sighted in the area
> summon high wizard
The High Wizard appears before you and asks if he can help. He says he will be
happy to do so, but only if you promise him something.
"I want you to bring me back the head of the Dark Lord".
@audiodude
audiodude / adventure.txt
Created December 7, 2019 23:42
Walter the Noble
You are Walter, a noble living in the kingdom of Larion. You have a pouch of
gold and a small dagger. You are awakened by one of your servants who tells
you that your keep is under attack. You look out the window and see the enemy
soldiers marching towards your door
> learn magic
The servant leads you to the library where he has hidden some books. He explains
that the enemy has been gathering all the knowledge they can find about magic
and then unleashing it on the world. The only way to stop them is to learn as
much as possible before they do
@audiodude
audiodude / adventure.txt
Created December 7, 2019 23:16
Darth Maul the Peasant
You are Darth Maul, a peasant living in the kingdom of Larion. You have a pitchfork
and a nothing else. You wake up and begin working in the fields. You see a girl
walking towards you with a basket full of vegetables. She is beautiful and she
wants to be your friend
> kiss her
She smiles at you and then kisses you on the cheek. "I'm sorry I can't go with
you," she says.
"It's okay," you say. "We'll find another way".
@audiodude
audiodude / adventure.txt
Created December 7, 2019 06:47
Bardric the Knight
You are Bardric, a knight living in the kingdom of Larion. You have a steel longsword
and a wooden shield. You are on a quest to defeat the evil dragon of Larion.
You've heard he lives up at the north of the kingdom. You set on the path to
defeat him and walk into a dark forest. As you enter the forest you see a large
black dragon flying through the sky. He is very angry.
"What do you want?" The dragon asks.
"I am a knight from the kingdom of Larion and I wish to speak with your king"
> smile
@audiodude
audiodude / adventure.txt
Last active December 7, 2019 06:35
Oslo the Rogue
You are Oslo, a rogue living in the kingdom of Larion. You have a long steel dagger and a length of rope. You walk down
the city street looking for somehwere to steal from. You look around and see that it is very quiet. There are no guards
patrolling the streets or any other people in sight
> You go to inn.
You decide to go to an inn where you can get away from the city. The only one in the area is called "The Inn at the
Crossroads". It seems like a good place to hide out
import xml.etree.ElementTree as Et
tree = Et.ElementTree(file = 'test.xml')
root = tree.getroot()
for child in root:
for grandchild in child:
print(grandchild.findall('.//Raw_Material'))