Socket
Socket
Sign inDemoInstall

github.com/jiko/cyborgmanifesto

Package Overview
Dependencies
0
Maintainers
0
Alerts
File Explorer

Install Socket

Protect your apps from supply chain attacks

Install

github.com/jiko/cyborgmanifesto

Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999). See also Computer Recreations, Scientific American 260, 122 - 125 (1989). A Markov chain algorithm generates text by creating a statistical model of potential textual suffixes for a given prefix. Consider this text: Our Markov chain algorithm would arrange this text into this set of prefixes and suffixes, or "chain": (This table assumes a prefix length of two words.) To generate text using this table we select an initial prefix ("I am", for example), choose one of the suffixes associated with that prefix at random with probability determined by the input statistics ("a"), and then create a new prefix by removing the first word from the prefix and appending the suffix (making the new prefix is "am a"). Repeat this process until we can't find any suffixes for the current prefix or we exceed the word limit. (The word limit is necessary as the chain table may contain cycles.) Our version of this program reads text from standard input, parsing it into a Markov chain, and writes generated text to standard output. The prefix and output lengths can be specified using the -prefix and -words flags on the command-line.

    v0.0.0-20140612020006-a0a63073d336

Version published
Maintainers
0

Readme

An Ironic Dream
===========

A Twitter bot, [@anironicdream](https://twitter.com/anironicdream), based on [Donna Haraway's Cyborg Manifesto](http://www.egs.edu/faculty/donna-haraway/articles/donna-haraway-a-cyborg-manifesto/) ([alternate link](http://wayback.archive.org/web/20120214194015/http://www.stanford.edu/dept/HPS/Haraway/CyborgManifesto.html)). 

Go code yanked from the [Codewalk Markov chain example](http://golang.org/doc/codewalk/markov/) and the [twittergo tweet example](https://github.com/kurrik/twittergo-examples/blob/master/tweet/main.go).

To use this bot, you need a four-line file called `CREDS` in the directory where you run the bot. `CREDS` must contain your Consumer Key, Consumer Secret, Access Token, and Access Token Secret, in that order, separated by new lines. To get those visit https://dev.twitter.com. To run the bot, use standard in, so on a Unix system:

    cyborgmanifesto < aCyborgManifesto.txt

I'm new to Go, but I think if you clone this repo, cd into it, and run `go install` you should get an executable with the name of this repository, unless you changed the name when you cloned it. If you `go get github.com/jiko/cyborgmanifesto` and then `go install github.com/jiko/cyborgmanifesto` you should have a `cyborgmanifesto` executable in `$GOPATH/bin`. [How to Write Go Code](http://golang.org/doc/code.html), and the Go documentation in general, clarify matters well.

FAQs

Last updated on 12 Jun 2014

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc