Skip to content

Instantly share code, notes, and snippets.

View CliffordAnderson's full-sized avatar

Clifford Anderson CliffordAnderson

View GitHub Profile
@CliffordAnderson
CliffordAnderson / news-topics.ipynb
Created October 23, 2023 20:50
News Topics.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CliffordAnderson
CliffordAnderson / convert-date.xqy
Last active July 17, 2022 01:56
XQuery Puzzles from Week 1, Day 5, Session 4 of the Advanced Digital Editions NEH Institute at the University of Pittsburgh
xquery version "3.1";
let $date := "July 15, 2022"
let $tokens := fn:tokenize($date, " ")
let $month :=
switch ($tokens[1])
case "January" return "01"
case "February" return "02"
case "March" return "03"
case "April" return "04"
@CliffordAnderson
CliffordAnderson / fibC.xqy
Created June 29, 2022 00:54
Fibonacci w/continuations
(: Thanks to friends at NashFP, especially Mike K. and Mark Wutka :)
declare function local:fibC($n as xs:integer, $memo as map(*), $con) {
if (map:contains($memo, $n)) then $con(map:get($memo, $n), $memo)
else
local:fibC($n - 1, $memo,
(: n1 = fib(n - 1) :)
function($n1 as xs:integer, $memo as map(*)) {
local:fibC($n - 2, $memo,
(: n2 = fib(n - 2) :)
xquery version "3.1";
declare function local:fac($n as xs:int) as xs:int {
if ($n = 0) then 1
else if ($n = 1) then 1
else $n * local:fac($n - 1)
};
declare function local:hFac($n as xs:int) as xs:int {
fn:fold-right(1 to $n, 1, function($a, $b) { $a * $b })
@CliffordAnderson
CliffordAnderson / deepfakes.md
Last active April 7, 2022 15:26
Links for Deepfakes
Letter English French German Spanish Portuguese Esperanto Italian Turkish Swedish Polish Dutch Danish Icelandic Finnish Czech
a 8.167 7.636 6.516 11.525 14.634 12.117 11.745 12.920 9.383 10.503 7.486 6.025 10.110 12.217 8.421
b 1.492 0.901 1.886 2.215 1.043 0.980 0.927 2.844 1.535 1.740 1.584 2.000 1.043 0.281 0.822
c 2.782 3.260 2.732 4.019 3.882 0.776 4.501 1.463 1.486 3.895 1.242 0.565 0 0.281 0.740
d 4.253 3.669 5.076 5.010 4.992 3.044 3.736 5.206 4.702 3.725 5.933 5.858 1.575 1.043 3.475
e 12.702 14.715 16.396 12.181 12.570 8.995 11.792 9.912 10.149 7.352 17.324 15.453 6.418 7.968 7.562
f 2.288 1.066 1.656 0.692 1.023 1.037 1.153 0.461 2.027 0.143 0.805 2.406 3.013 0.194 0.084
g 2.015 0.866 3.009 1.768 1.303 1.171 1.644 1.253 2.862 1.731 3.403 4.077 4.241 0.392 0.092
h 6.094 0.737 4.577 0.703 0.781 0.384 0.636 1.212 2.090 1.015 2.380 1.621 1.871 1.851 1.356
i 6.966 7.529 6.550 6.247 6.186 10.012 10.143 9.600* 5.817 8.328 6.499 6.000 7.578 10.817 6.073
@CliffordAnderson
CliffordAnderson / 10-notes-2020-04-07.md
Last active February 8, 2022 18:10
CMAP 8002: History of the Personal Computer
@CliffordAnderson
CliffordAnderson / vandyCite.js
Last active August 17, 2020 21:44
Zotero converter for Wikidata Quick Statements
{
"translatorID": "51e5355d-9974-484f-80b9-f84d2b55782e",
"label": "VandyCite QuickStatements",
"creator": "Philipp Zumstein and Chris Benda",
"target": "txt",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 2,