Skip to content

Instantly share code, notes, and snippets.

#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "Walker.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class Day2_WalkerAttractionApp : public App {
/*
Thomas Sanchez Lengeling.
http://codigogenerativo.com/
KinectPV2, Kinect for Windows v2 library for processing
3D Skeleton.
Some features a not implemented, such as orientation
*/
import itertools
import re
from random import randint
from textblob import TextBlob, Word
from pattern.en import conjugate, PAST
story_ballets = []
# read in files
swanlake = open("swanlake.txt")
import requests
def searchNYTimes(term,key,page=0):
r = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?fq=headline:(' + term + ')&page='+str(page)+'&api-key=' + str(key))
if r.ok == False:
return False
data = r.json()
docs = data['response']['docs']
for doc in docs:
#
# Worksheet #4
#
# This worksheet is also a Python program. Your task is to read the
# task descriptions below and then write one or more Python statements to
# carry out the tasks. There's a Python "print" statement before each
# task that will display the expected output for that task; you can use
# this to ensure that your statements are correct.
#
# In this worksheet, some of the tasks will throw an error that causes
import requests
from random import randint
counter = 0
term = "Right-Wing"
while counter < 20:
r = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?fq=headline:(' + term + ')&api-key=8507eaad79faa9ac49204db270a8e0e3:13:70195569')
if r.ok == False:
break
#
# Worksheet #3
#
# This worksheet is also a Python program. Your task is to read the
# task descriptions below and then write one or more Python statements to
# carry out the tasks. There's a Python "print" statement before each
# task that will display the expected output for that task; you can use
# this to ensure that your statements are correct.
#
# In this worksheet, some of the tasks will throw an error that causes
############################
## By: Kat Sullivan
############################
import facebook
import json
# take in the ceratin comment as a list of words, and the index where the queried word occurs in a list
# return the phrase
def add_to_list(words, index):
#
# RWET Programming Exercise B
#
# This worksheet is also a Python program. Your task is to read the
# task descriptions below and then write one or more Python statements to
# carry out the tasks. There's a Python "print" statement before each
# task that will display the expected output for that task; you can use
# this to ensure that your statements are correct.
#
############################################
## By: Kat Sullivan
############################################
from random import randint
import sys
prev_line = ""
poem = ""