Skip to content

Instantly share code, notes, and snippets.

View sudodoki's full-sized avatar

Джон, просто Джон sudodoki

View GitHub Profile

Time words from http://www.wjh.harvard.edu/~inquirer/Time%40.html (yet, it's missing 5 words, given this was taken from archived version)

Word Tags & Definition

  • ABRUPT => Neg Modif Time* Ngtv |
  • ADVANCE#4 => LY Time* | 13% idiom-adv: "In advance"--before, beforehand
  • AFTER#1 => PREP LY Time* PFREQ | 92% prep-adv: Later in time than, following, in pursuit or search of.
  • AFTERNOON => Noun ABS TIME Time* | noun-adj: The time from noon until evening--part of day.
  • AFTERWARD => Modif LY Time* | adverb: In later or subsequent time, subsequently.
  • AGE#1 => Noun ABS TIME Time* | 79% noun-adj: Time period measured by length of existence, era; possessing a certain age (3)

This is a copy of saved version of http://www.marlodge.supanet.com/museum/funcword.html by John Higgins (john@wordscape.net)

Function words in English

Linguists usually draw a distinction between content words, those words whose meaning is best described in a dictionary and which belong in open sets so that new ones can freely be added to the language, and function words, words with little inherent meaning but with important roles in the grammar of a language. Typically the content words are nouns, verbs, adjectives and some adverbs, while function words are pronouns, conjunctions, prepositions, auxiliary verbs, and some adverbs. The lists below were originally produced for the purpose of masking selected parts of speech in the text game ECLIPSE by John and Muriel Higgins.

Adverbs other than manner adverbs and omitting the funny legal ones.

AGAIN AGO ALMOST ALREADY ALSO ALWAYS ANYWHERE BACK ELSE EVEN EVER EVERYWHERE FAR HENCE HERE HITHER HOW HOWEVER NEAR NEARBY NEARLY NEVER NOT NOW NOWHERE OFTE

@sudodoki
sudodoki / visualizing_topic_models.py
Created December 24, 2017 20:23 — forked from tokestermw/visualizing_topic_models.py
visualization topic models in four different ways
import json
import urlparse
from itertools import chain
flatten = chain.from_iterable
from nltk import word_tokenize
from gensim.corpora import Dictionary
from gensim.models.ldamodel import LdaModel
from gensim.models.tfidfmodel import TfidfModel
@sudodoki
sudodoki / springer-free-maths-books.md
Created September 9, 2017 14:47 — forked from bishboria/springer-free-maths-books.md
Springer made a bunch of books available for free, these were the direct links
@sudodoki
sudodoki / splitter.sh
Created September 7, 2017 14:34
split filename and move `abcdefgh.txt` -> `ab/cd/efgh.txt`.
#!/usr/bin/env bash
# find input -type f -maxdepth 1 | parallel --load 100% ./splitter.sh input {}
input_dir=$1
f=$2
if [[ -f $f ]]
then
filename=$(basename $f)
enclosing="${filename:0:1}/${filename:1:1}/"
mkdir -p "$input_dir/$enclosing"
mv $f "$input_dir/$enclosing$filename"
@sudodoki
sudodoki / Stream-examples.lisp
Created August 11, 2017 12:36 — forked from danlentz/Stream-examples.lisp
Sbcl stream exqmples
(defclass wrapped-stream (fundamental-stream)
((stream :initarg :stream :reader stream-of)))
(defmethod stream-element-type ((stream wrapped-stream))
(stream-element-type (stream-of stream)))
(defmethod close ((stream wrapped-stream) &key abort)
(close (stream-of stream) :abort abort))
(defclass wrapped-character-input-stream
const pair = (x, y) => f => f(x, y)
const head = (f) => f(x => x)
const tail = (f) => f((_, x) => x)
var a = pair(5, 10)
head(a)
tail(a)
@sudodoki
sudodoki / flatten-maps.clj
Last active November 29, 2023 00:26
Flatten nested maps using clojure / clojurescript using compound keys
(defn get-key
[prefix key]
(if (nil? prefix)
key
(str prefix "-" key)))
(defn flatten-map-kvs
([map] (flatten-map-kvs map nil))
([map prefix]
(reduce
(fn [memo [k v]]
const subsets = ([first, ...rest]) =>
first
? subsets(rest)
.concat(subsets(rest).map(subset => subset.concat(first)))
: [[]]
console.log(JSON.stringify(subsets([1, 2, 3])))
; [[],[3],[2],[3,2],[1],[3,1],[2,1],[3,2,1]]
#!/bin/bash
while true
do
output=$( curl -s $1 -D -)
if [ $? -ne 0 ]; then
echo "$(date) Something went wrong with $1: $output
"
else
echo "$(date) Got response $1"
fi