View gist:56189ad10e9a1625178fa6ca4c7b5c85
Count[Characters@ToLowerCase@WolframAlpha["1971 texas rangers roster", {{"Result", 1},  "Plaintext"}, PodStates -> {"More"}], "z"];
MLBTeams = Drop[StringSplit[WolframAlpha["all major league baseball teams", {{"Result", 1},  "Plaintext"}, PodStates -> {"More", "More"}], {"(", "|"}], -1];
Grid[Take[Reverse@SortBy[First@Table[{team, yr, Count[Characters@ToLowerCase@WolframAlpha[ToString[yr] <>  " " <>  team <>  " roster", {{"Result", 1},  "Plaintext"}, PodStates -> {"More"}], "z"]}, {team, MLBTeams}, {yr, Range[1903, 2016]}], Last], 40], Frame-> All]
View subanagram.py
#!/usr/bin/python
# subanagram.py
# This program receives as input an English word, and then
# delivers as output those English words which can be spelled with the
# letters in the input word.
# This script is Copyleft 2002, 2012 by Mitchell Szczepanczyk under the
# terms of the General Public License. Anyone is free to copy, modify,
View subanagram2.pl
#!/usr/bin/perl
# subanagram.pl
# This program receives as input an English word, and then
# delivers as output those English words which can be spelled with the
# letters in the input word.
# This script is Copyleft 2002 by Mitchell Szczepanczyk under the
# terms of the General Public License. Anyone is free to copy, modify,
View subanagram.pl
#!/usr/local/bin/perl
# subanagram.pl
# This program receives as input an English word, and then
# delivers as output those English words which can be spelled with the
# letters in the input word.
# This script is Copyleft 2002 by Mitchell Szczepanczyk under the
# terms of the General Public License. Anyone is free to copy, modify,
View gist:d74014b94eb6220f8c8289179ba69349
Intersection[WordData[All, "Verb"], WordData[All, "Noun"], WordData[All, "Adjective"]]
{abstract,ace,ad-lib,advance,agglomerate,aggregate,alert,alien,alternate,antic,antique,arch,associate,average,azure,back,backhand,bankrupt,base,
bay,beat,beetle,best,better,bias,birch,bitter,black,blame,blank,blanket,blind,blindfold,blue,bluff,bombproof,bone,bootleg,boss,bottom,bound,
brag,brave,brief,broadside,bronze,brown,buckram,buff,bully,bum,burlesque,bush,bust,calm,camp,carmine,center,champion,chance,charcoal,
chelate,clarion,clean,clear,close,cod,collect,color,colour,compact,compound,concrete,confederate,conglomerate,conjugate,content,converse,cool,
coordinate,correlate,counter,counterfeit,crack,crackle,crank,crescendo,crimson,crisp,crisscross,cross,cut,damascene,damn,damp,deaf,
decrescendo,degenerate,deviate,discontent,divine,double,down,dread,dress,dry,dummy,dun,duplex,duplicate,elect,empty,equal,even,express,
faint,fair,fake,fancy,fast,fat,fell,fine,firm,fit,flagellate,flash,fleet,flip,flush,fly,forfeit,forward
View gist:a77c9361b9dfff6f8f57bf772ef5c2a4
from itertools import product
final_answer = set()
for a in open('mrc2.dct'):
cols = a.split(' ', 1)
b = list(cols[0])
c = int(b[28] + b[29] + b[30]) # concreteness rating
i = int(b[31] + b[32] + b[33]) # imagery rating
f = int(b[25] + b[26] + b[27]) # familiarity rating
View gist:daff445a6d7107d31933a72c7e21a2f6
Round {question: {}, responses: []} // initial state
Actions Actions {answerQuestion(choice) advanceQuestion()}
Redux Act
View gist:710dafcd2d0119e934759a71fd6f1af1
CloudDeploy[WordCloud[Flatten[TextCases[StringCases[URLFetch["www.nytimes.com"], Shortest["<p class=\"summary\" ~~ x__ ~~ "</p>"] -> x], "Noun"]]]]
https://www.wolframcloud.com/objects/aad30d4c-cce8-45c2-b0c3-afa03f606f64
View gist:5b55a9f87e8941d58a63e27a1a613e5b
CloudDeploy[APIFunction[{"p" -> "String"}, DateString[Interpreter["Person"][#p]["DeathDate"], {"MonthName", " ", "DayShort", ", ", "Year"}] &]]
-- e.g., https://www.wolframcloud.com/objects/29dd4c7b-77f3-49ff-84be-fc557ddfc9a0?p=Michael+Jackson
-- https://www.wolframcloud.com/objects/fa2cf38e-b000-4762-b249-8d19bfaef1a0?p=Doris+Day
CloudDeploy[APIFunction[{"p" -> "String"}, Which[
FailureQ[Interpreter["Person"][#p]],
"I'm sorry, but I cannot determine that.",
MissingQ[Interpreter["Person"][#p]["DeathDate"]],
StringJoin[#p, " is still alive, and is ", ToString[Floor[DateDifference[Interpreter["Person"][#p]["BirthDate"], Now, "Year"]]], " old." ],
View gist:c735769421deacd83fa240c232594588
#!/usr/bin/python
# Source: http://ubuntuforums.org/showthread.php?t=1215158
import urllib2
import sys
from BeautifulSoup import BeautifulSoup
file = sys.argv[1]
# assumes file is a list of valid URLs, one URL per line