#Make-A-Twitter-Bot Workshop
Session led by Allison Parrish
##Some of my bots
- Power Vocab Tweet (markov chains)
- Library of Emoji (context-free grammars)
- Egress Methods (CMU pronouncing dictionary)
- Eventually Bot
the best way (I've found) to completely uninstall node + npm is to do the following: | |
go to /usr/local/lib and delete any node and node_modules | |
go to /usr/local/include and delete any node and node_modules directory | |
if you installed with brew install node, then run brew uninstall node in your terminal | |
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there | |
go to /usr/local/bin and delete any node executable | |
You may need to do the additional instructions as well: | |
sudo rm /usr/local/bin/npm |
#Make-A-Twitter-Bot Workshop
Session led by Allison Parrish
##Some of my bots
/* | |
* A quick example of how to use Bluebird and Q to conjure your own promises | |
* | |
* Everything going on here is explained further in the following video: | |
* http://youtu.be/OU7WuVGSuZw?list=PLT-DLWOBKbB4dZ83I_7Ca-sUTvorckG-E | |
* | |
*/ | |
// Import node modules | |
var Q = require('q'); |
/* | |
Your job is to write a function which increments a string, to create a new string. | |
If the string already ends with a number, the number should be incremented by 1. | |
If the string does not end with a number the number 1 should be appended to the new string. | |
Examples: | |
foo -> foo1 | |
foobar23 -> foobar24 |
/* | |
actually.js | |
_ _ _ | |
__ _ __ _ __ _ __ _ ___| |_ _ _ __ _| | |_ _ | |
/ _` |/ _` |/ _` |/ _` |/ __| __| | | |/ _` | | | | | | | |
| (_| | (_| | (_| | (_| | (__| |_| |_| | (_| | | | |_| |_ | |
\__,_|\__,_|\__,_|\__,_|\___|\__|\__,_|\__,_|_|_|\__, ( ) | |
|___/|/ | |
*/ |
var fs = require('fs'), | |
stub = require('./stub'), | |
_ = require('underscore'), | |
request = require('request'); | |
// config for local file | |
var basePath = "images/", | |
data = stub.data, | |
urlRoot = "http://cdn.catalogs.com/"; |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
// npm install cheerio | |
// npm install request | |
function getImages(uri) { | |
var request = require('request'); | |
var url = require('url'); | |
var cheerio = require('cheerio'); | |
path = require('path') | |
var fs = require('fs'); | |
//Andrew Lim 2013-09-07 | |
//Compile with: -framework CoreMIDI -framework CoreFoundation -framework CoreAudio | |
#include <stdio.h> | |
#include <CoreMIDI/CoreMIDI.h> | |
const char * const NOTE_NAMES[] = { | |
"C","C#","D","D#","E","F","F#","G","G#","A","A#","B" | |
}; |
// set the date we're counting down to | |
var target_date = new Date("Aug 15, 2019").getTime(); | |
// variables for time units | |
var days, hours, minutes, seconds; | |
// get tag element | |
var countdown = document.getElementById("countdown"); | |
// update the tag with id "countdown" every 1 second |