This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "DOH!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Blink</title> | |
| <style type="text/css"> | |
| blink { | |
| display: block; | |
| } | |
| .nav > blink { | |
| display: inline-block; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| re_normalize = re.compile('[\W]+') | |
| def normalize_anagram(a): | |
| a = a.lower() | |
| a = re_normalize.sub('', a) | |
| a = ''.join(sorted(a)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype HTML> | |
| <html> | |
| <head> | |
| <title>asdf</title> | |
| </head> | |
| <body> | |
| <object width="356" height="600" type="application/x-shockwave-flash"> | |
| <param name="allowScriptAccess" value="always" /> | |
| <param name="allownetworking" value="all" /> | |
| <param name="allowfullscreen" value="true" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function bleed(selector) { | |
| $(selector).each(function (i, el) { | |
| var elImg = $(el); | |
| var offset = elImg.offset(); | |
| var bimg = $('<img>'); | |
| bimg.attr( | |
| 'src', | |
| 'http://rs201.pbsrc.com/albums/aa137/angelsuejones23/f_ed80a26488.gif~c200' | |
| ); | |
| bimg.css({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('img').each(function (i, el) { | |
| var elImg = $(el); | |
| var offset = elImg.offset(); | |
| var bimg = $('<img>'); | |
| bimg.attr( | |
| 'src', | |
| 'http://rs201.pbsrc.com/albums/aa137/angelsuejones23/f_ed80a26488.gif~c200' | |
| ); | |
| bimg.css({ | |
| position: 'absolute', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # Copyright (C) 2012, Almar Klein, Ant1, Marius van Voorden | |
| # | |
| # This code is subject to the (new) BSD license: | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # * Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. | |
| # * Redistributions in binary form must reproduce the above copyright |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import moviepy.editor as mpy | |
| from moviepy.video.tools.cuts import FramesMatches | |
| def youtube2gif(youtube_id, t_start=None, t_end=None): | |
| # Get the video from youtube | |
| download_filename = "{}.mp4".format(youtube_id) | |
| mpy.download_webfile(youtube_id, download_filename) | |
| clip = mpy.VideoFileClip(download_filename).resize(width=200) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| '''Keep the convolutional network weights only.''' | |
| import sys | |
| import h5py | |
| if __name__ == '__main__': | |
| in_filename, out_filename = sys.argv[-2:] | |
| print('Stripping {} into {}'.format(in_filename, out_filename)) | |
| in_f = h5py.File(in_filename, 'r') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import numpy as np | |
| import six | |
| # HACK: this should live in a directory alongside the skip-thoughts project | |
| sys.path.append('../skip-thoughts') | |
| import skipthoughts | |
| import decoding.tools |