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
# csv is built in | |
import csv | |
# requests must be installed with `pip`. See also: virtual environment. | |
import requests | |
# #Use this instead of reader[:10] to get a random 10 instead of the first ten. | |
# import random | |
# random.sample(reader, 10) | |
# Double quoted strings will allow for multiple lines, but all of the whitespace will be preserved, |
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
class Fruit: | |
def __init__(self, name): | |
self.name = name | |
apple = Fruit('apple') | |
apples = { | |
'apple': apple, |
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
fruits={'apple': 0.49, 'banana': 0.69, 'peach': 1.29, 'pear': 1.49, 'watermelon': 2.99} | |
Incrementing banana by 1 | |
fruits={'apple': 0.49, 'banana': 1.69, 'peach': 1.29, 'pear': 1.49, 'watermelon': 2.99} |
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
from datetime import datetime | |
import time | |
import requests | |
import tqdm | |
API_TOKEN = 'YOUR_API_TOKEN' | |
ACCOUNT_ID = 'YOUR_ACCOUNT_ID' | |
requested = False |
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
{ | |
"actor": "https://travisbriggs.com/digital.garden", | |
"type": "Create", | |
"published": "2023-11-14T00:00:00.000Z", | |
"id": "https://travisbriggs.com/garden/compost/publish", | |
"to": [ | |
"https://www.w3.org/ns/activitystreams#Public" | |
], | |
"object": { | |
"attributedTo": "https://travisbriggs.com/digital.garden", |
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 * as fs from 'node:fs/promises'; | |
import crypto from 'node:crypto'; | |
import fetch from 'node-fetch'; | |
const document = { | |
"actor": "https://travisbriggs.com/digital.garden", | |
"type": "Create", | |
"published": "2023-11-14T00:00:00.000Z", | |
"id": "https://travisbriggs.com/garden/compost/publish", | |
"to": [ |
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 | |
from wp1.exceptions import Wp1RetryableSelectionError, Wp1FatalSelectionError | |
<SNIP> | |
try: | |
r = requests.post('https://query.wikidata.org/sparql', | |
headers={'User-Agent': WP1_USER_AGENT}, | |
data={ |
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
[program:twins] | |
command=/home/tmoney/go/bin/twins --config /home/tmoney/.config/twins/config.yaml | |
user=tmoney |
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
$ vite build | |
vite v3.2.4 building for production... | |
transforming... | |
✓ 71 modules transformed. | |
'default' is not exported by node_modules/datatables.net/js/jquery.dataTables.js, imported by src/components/MyLists.vue | |
file: /home/runner/work/wp1/wp1/wp1-frontend/src/components/MyLists.vue:79:0 | |
77: import $ from 'jquery'; | |
78: $.noConflict(); | |
79: import DataTable from 'datatables.net'; | |
^ |
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 json | |
from wp1.custom_tables.us_roads import CustomTable as CT | |
from wp1.wp10_db import connect as wp10_connect | |
params = { | |
'wiki_path': | |
'Highways', | |
'template': | |
'us_roads.jinja2', |
NewerOlder