| friend_id | friend_name | pet_id | owner_id | pet_type | pet_name |
|---|---|---|---|---|---|
| 1 | John | 1 | 1 | goldfish | Fishy |
| 2 | Sarah | 1 | 1 | goldfish | Fishy |
| 3 | Rachel | 1 | 1 | goldfish | Fishy |
| 4 | Sam | 1 | 1 | goldfish | Fishy |
| 1 | John | 2 | 1 | goldfish | Nemo |
| 2 | Sarah | 2 | 1 | goldfish | Nemo |
| 3 | Rachel | 2 | 1 | goldfish | Nemo |
| 4 | Sam | 2 | 1 | goldfish | Nemo |
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
| <div id="dropbox-include">Loading from Dropbox...</div> | |
| <script language="javascript"> | |
| function loadFromProxy() { | |
| $("#dropbox-include").html("Loading from Dropbox proxy..."); | |
| var newUrl = "{{page.dropbox_url}}".replace("https://dl.dropboxusercontent.com/u/000000/permanent/text/", "https://your-dropbox-text-proxy.herokuapp.com/"); | |
| jQuery.get(newUrl, function(data) { | |
| console.log("Got file from "+newUrl+".") | |
| }).done(function(data){ | |
| var converter = new Markdown.Converter(); | |
| $("#dropbox-include").html(converter.makeHtml(data)); |
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
| -- Source: http://forums.omnigroup.com/showthread.php?t=31062 | |
| tell application "OmniGraffle" | |
| set thedocument to front document | |
| set thePath to the path of the thedocument | |
| set ASTID to AppleScript's text item delimiters | |
| set AppleScript's text item delimiters to "/" | |
| set theDirectory to (text items 1 through -2 of thePath) as text | |
| set AppleScript's text item delimiters to ASTID | |
| # Save the original canvas for restoration |
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
| <a href="javascript:(function()%7Bvar%20x%20%3D%20window.prompt(%22Search%20Amazon.com%20order%20history%20for%3A%22)%3Bwindow.location.href%3D'https%3A%2F%2Fwww.amazon.com%2Fgp%2Fyour-account%2Forder-history%2Fref%3Doh_aui_search%3Fopt%3Dab%26search%3D'%2BencodeURIComponent(x)%7D)()">Drag to your bookmarks bar</a> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # Assumes `df` is a Pandas DataFrame object | |
| import IPython.core.display as di | |
| for k, v in df.columns.to_series().groupby(df.dtypes).groups.iteritems(): | |
| di.display_html("<ul><li><b>%s</b><ul>%s</ul></li></ul>" % (k, ''.join(["<li>%s</li>" % vv for vv in sorted(v)])), raw=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
| # http://stackoverflow.com/questions/29329667/ipython-notebook-script-deprecated-how-to-replace-with-post-save-hook | |
| import os | |
| from subprocess import check_call | |
| c = get_config() | |
| def post_save(model, os_path, contents_manager): | |
| """post-save hook for converting notebooks to .py scripts""" | |
| if model['type'] != 'notebook': |
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 IPython.core.display as di | |
| # This line will hide code by default when the notebook is exported as HTML | |
| di.display_html('<script>jQuery(function() {if (jQuery("body.notebook_app").length == 0) { jQuery(".input_area").toggle(); jQuery(".prompt").toggle();}});</script>', raw=True) | |
| # This line will add a button to toggle visibility of code blocks, for use with the HTML export version | |
| di.display_html('''<button onclick="jQuery('.input_area').toggle(); jQuery('.prompt').toggle();">Toggle code</button>''', raw=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
| source "https://rubygems.org" | |
| gem 'json' | |
| gem 'idonethis' |
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
| #!/bin/bash | |
| echo -n "%snippet:xxxxtitle%" | tr -d '\n' |