December 2022
import openai
import json
import time
<?xml version="1.0" ?> | |
<TEI xmlns="http://www.tei-c.org/ns/1.0"> | |
<teiHeader> | |
<fileDesc> | |
<titleStmt> | |
<title>10.1111_1467-6478.00057</title> | |
</titleStmt> | |
<publicationStmt> | |
<publisher>mpilhlt</publisher> | |
</publicationStmt> |
import os | |
import re | |
import requests | |
from bs4 import BeautifulSoup | |
from urllib.parse import urljoin, urlparse | |
import argparse | |
def download_resource(session, url, base_dir, level=0): | |
try: | |
response = session.get(url, stream=True) |
/* set the background image for all pages which have an (empty) <!-- .slide: data-background="" --> marker */ | |
/* create overlay with background image */ | |
.slide-background-content::before { | |
content: ""; | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
background-image: url("image-url"); |
import dateparser | |
import re | |
import requests | |
from bs4 import BeautifulSoup | |
import csv | |
from collections import defaultdict | |
url = "https://easychair.org/smart-program/<conference_name>/program.html" | |
track_url = "https://easychair.org/smart-program/<conference_name>/de_tracks.html" | |
css_url = "https://easychair.org/smart-program/<conference_name>/program.css" |
// written with the help of ChatGPT4 | |
MATCH (n)-[r]->(m) | |
WITH DISTINCT labels(n) AS ln, type(r) AS rt, labels(m) AS lm | |
WITH "(" + apoc.text.join(ln, ":") + ")-[:" + rt + "]->(" + apoc.text.join(lm, ":") + ")" AS CypherPathExpression | |
RETURN apoc.text.join(COLLECT(CypherPathExpression), '\n') AS GraphDataModel |
# written by GPT4 | |
import requests | |
import json | |
import platform | |
import sys | |
import argparse | |
def get_latest_stable_version(): | |
url = "https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json" | |
response = requests.get(url) |
import dateparser | |
import re | |
import requests | |
from bs4 import BeautifulSoup | |
import csv | |
from collections import defaultdict | |
url = ".../program.html" | |
track_url = ".../tracks.html" | |
css_url = "..../program.css" |
# see https://github.com/sparklemotion/sqlite3-ruby/issues/383#issuecomment-1473000796 | |
SQLTITE_EXTENSIONS_DIR=/opt/sqlite-extensions # must exist | |
cd /tmp | |
git clone https://github.com/sqlite/sqlite.git | |
cd sqlite | |
gcc -g -fPIC -shared ./ext/misc/spellfix.c -o spellfix.o | |
sudo mv spellfix.o $SQLTITE_EXTENSIONS_DIR | |
rm -rf sqlite # clean up |
#!/usr/bin/env bash | |
# run as root user | |
apt install -y git ruby-dev curl | |
# RUBY | |
cd ~ | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc |