This file contains hidden or 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
javascript:var d=document,s=d.createElement('script');s.src='https://www.zotero.org/bookmarklet/loader.js';(d.body?d.body:d.documentElement).appendChild(s);void(0); |
This file contains hidden or 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
// This is a code comment. | |
// Any line preceded by two slashes | |
// will not be executed as code. | |
// (Even if the line has otherwise functioning code in it.) | |
// You can also use these double slashes _after_ a line of code, | |
// to serve as an in-line comment on that line of code. | |
// (Kinda like a note in the margin.) | |
// This little program requires "libraries"--other programs that extend the functionality of the base node.js code |
This file contains hidden or 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
var Twit = require('twit'); | |
var rita = require('rita'); | |
// In a Station of the Metro | |
// | |
// The apparition of these faces in the crowd: | |
// Petals on a wet, black bough. | |
This file contains hidden or 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
var rita = require('rita'); | |
var fs = require('fs'); | |
rm = new rita.RiMarkov(2), file = 'moby-dick.txt'; | |
rm.minSentenceLength = 5; | |
rm.maxSentenceLength = 20; | |
This file contains hidden or 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
#!/usr/bin/python | |
# Through the Park, copyright (c) 2013 Nick Montfort <[email protected]> | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
This file contains hidden or 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
javascript:void(q=prompt('Enter%20search%20term:',getSelection()));if(q)void(location.href='https://www.flickr.com/search/?w=126377022@N07&q='+escape(q)) |
This file contains hidden or 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 random | |
possibleKings = ['king', 'queen', 'Elvis impersonator'] | |
possibleVerbs = ['dead', 'sleeping', 'dying', 'singing'] | |
king = random.choice(possibleKings) | |
dead = random.choice(possibleVerbs) | |
print 'The ' + king + ' is ' + dead + '. Long live the ' + king + '.' |
This file contains hidden or 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
# Any line that begins with a hash (pound sign) is ignored by the program | |
# Like this one | |
# These are called comments | |
# Think of comments in code as marginalia | |
# This Is Just To Say | |
# William Carlos Williams, 1883 - 1963 | |
# | |
# I have eaten | |
# the plums |
This file contains hidden or 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
<html> | |
<head> | |
<canvas id="canvas" width=1200 height=400 style="border: 0px dashed #000000; display: block; margin:0 auto;"></canvas> | |
<script src="rita.js"></script> | |
<script> | |
RiTa.p5Compatible(true); | |
RiText.defaultFont("Georgia",18); | |
var rm = new RiMarkov(RiTa.random(2,5)); |
OlderNewer