List all posts, tags and categories in Jekyll.
Octopress users: if you found "
is escaped in the generated JSON file, please change them to \"
. Refer to this issue.
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Foo</title> | |
<meta charset='utf-8' /> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' /> | |
<style type='text/css'> | |
body { | |
font-family: 'Helvetica'; | |
letter-spacing:-5px; |
List all posts, tags and categories in Jekyll.
Octopress users: if you found "
is escaped in the generated JSON file, please change them to \"
. Refer to this issue.
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
--- | |
title: "Programming Literary Bots" | |
author: "Ryan Cordell" | |
date: "3/12/2017" | |
output: html_document | |
--- | |
## Acknowledgements | |
This version of my twitterbot assignment was adapted from [an original written in Python](https://www.dropbox.com/s/r1py3zazde2turk/Trendingmore.py?dl=0), which itself adapted code written by Mark Sample. That orginal bot tweeted (I've since stopped it) at [Quoth the Ravbot](https://twitter.com/Quoth__the). The current version owes much to advice and code borrowed from two colleagues at Northeastern University: Jonathan Fitzgerald and Benjamin Schmidt. |
# get recent changes from wikipedia | |
library(rvest) | |
n_changes <- 5000 | |
recent_changes_url <- paste0("https://en.wikipedia.org/w/index.php?title=Special:RecentChanges&limit=", n_changes , "&days=1") | |
# connect to website | |
html <- read_html(recent_changes_url) |
# This script builds on Aleszu Bajak's excellent | |
# [tutorial on building a course website using R Markdown and Github pages](http://www.storybench.org/convert-google-doc-rmarkdown-publish-github-pages/). | |
# I was excited about the concept but wanted to automate a few of the production steps: namely generating the HTML files | |
# for the site from the RMD pages (which Aleszu describes doing one-by-one) and generating the site navigation menu, | |
# which Aleszu handcodes in the `_site.yml` file. This script should automate both processes, though it may have some quirks | |
# unique to my setup that you'd want to tweak to fit your own. It's likely more loquacious than necessary as well, so feel free | |
# to condense as you can. Ideally, each time you make updates to your RMD files you can run this script to generate updated HTML | |
# pages and a new `_site.yml`. Then commit changes to Github and you're up and running! | |
# Once you've got everything configured for your own site below, you should be able to run `source('rend |
# This line imports the modules we will need. The first is the sys module used | |
# to read the command line arguments. Second the Python Imaging Library to read | |
# the image and third numpy, a linear algebra/vector/matrix module. | |
import sys; from PIL import Image; import numpy as np | |
# This is a list of characters from low to high "blackness" in order to map the | |
# intensities of the image to ascii characters | |
chars = np.asarray(list(' .,:;irsXA253hMHGS#9B&@')) | |
# Check whether all necessary command line arguments were given, if not exit and show a |
from __future__ import absolute_import, division, print_function | |
""" | |
This is a modification of the classify_images.py | |
script in Tensorflow. The original script produces | |
string labels for input images (e.g. you input a picture | |
of a cat and the script returns the string "cat"); this | |
modification reads in a directory of images and | |
generates a vector representation of the image using |
#!/usr/bin/python | |
## Split audio files into chunks | |
## Daniel Pett 1/5/2020 | |
__author__ = 'portableant' | |
## Tested on Python 2.7.13 | |
import argparse | |
import os | |
import speech_recognition as sr |