Skip to content

Instantly share code, notes, and snippets.

@genekogan
genekogan / scrapeImages.py
Created February 22, 2017 11:49
scraping full size images from Google Images
from bs4 import BeautifulSoup
import requests
import re
import urllib2
import os
import argparse
import sys
import json
# adapted from http://stackoverflow.com/questions/20716842/python-download-images-from-google-image-search
@ofZach
ofZach / gist:26f7e65fcc8018db1f4c
Created March 5, 2016 19:04
paperjs examples from SFPC workshop
//---------------------------------------------------------------------- paper script -> javascript
// Define a point to start with
var point1 = new Point(10, 20);
debugger;
// Create a second point that is 4 times the first one.
// This is the same as creating a new point with x and y
// of point1 multiplied by 4:
var point2 = point1 * 4;
@nasser
nasser / grab-json-data.js
Last active February 13, 2016 19:17
Downloading and Parsing JSON
// node.js
// use the built in http library
var http = require("http");
// start a GET request for the URL
http.get("http://marsweather.ingenology.com/v1/latest/",
function(result) {
// when the request is ready, start downloading the data in chunks
var data = "";
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:1454911219436,1454911282305,1454911348848,1454911394202,1454911542475,1454911590322</id>
<updated>2016-02-08T06:06:48Z</updated>
<author>
<name>Bernardo Santos Schorr</name>
<email>[email protected]</email>
</author>
<entry>
<category term='filter'></category>
@vvo
vvo / video-snapshots-sprites.sh
Created July 15, 2013 14:28
generate sprites of video snapshots
sudo aptitude install ffmpeg
sudo aptitude install imagemagick
# fps=1 > every seconds
ffmpeg -i video.mp4 -f image2 -vf fps=fps=1 out%d.png
# horizontal sprite, resized at 30%
convert -resize 30% +append out*.png sprite-1-sec.png
# references: