Skip to content

Instantly share code, notes, and snippets.

View hernamesbarbara's full-sized avatar

austin hernamesbarbara

View GitHub Profile
@danharper
danharper / background.js
Last active March 30, 2024 18:25
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
anonymous
anonymous / 01.configure
Created October 24, 2013 22:00
This is the Qt for Mac OS X Open Source Edition.
You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 3.
You have already accepted the terms of the license.
@gabraganca
gabraganca / output_toggle_html.tpl
Last active February 15, 2017 17:37
Template to use with `ipython nbconvert` when generating HTML. With this, all input cell are hidden. Thanks @damianavila for the initial setup (http://www.damian.oquanta.info/posts/hide-the-input-cells-from-your-ipython-slides.html). I have also take some code from the `custom.css` of @olgablot published in http://nbviewer.ipython.org/5357268.
{%- extends 'full.tpl' -%}
{% block input_group -%}
<div class="input_hidden">
{{ super() }}
</div>
{% endblock input_group %}
{%- block header -%}
{{ super() }}
# coding=UTF-8
from __future__ import division
import nltk
import re
import requests
# Add your freebase key here
# If you don't have one, register at https://code.google.com/apis/console
FREEBASE_KEY = ""
@bbengfort
bbengfort / similarity.py
Last active February 2, 2016 19:00
Computation of similarity scores - Euclidean Distance and Pearson Correlations
#!/usr/bin/env python
import operator
from math import sqrt
from reader import PreferenceReader
class SimilarityScoring(PreferenceReader):
"""
Extends the preference reader class to give our data structure the
@drewconway
drewconway / deploy.R
Created August 19, 2013 15:18
Template for deploying draft predictions for Yhat Fantasy Football Challenge using R
library(yhatr)
model.require <- function() {
library(plyr)
}
model.transform <- function(df) {
df
}
@hannes-brt
hannes-brt / ipy_hide_input
Created August 12, 2013 00:20
This is a simple command line tool that adds a small snippet of Javascript to the end of the HTML output of `ipython nbconvert` that hides the input code in the output. This works for both '--to html' and '--to slides' The tool works both when given a file name or by reading from stdin: ```bash ipy_hide_input input_file.slides.html ipython nbcon…
#! /usr/bin/env python
"""
The MIT License (MIT)
Copyright (c) 2013 Hannes Bretschneider
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
@ch-gilbert
ch-gilbert / Sublime-BracketHighlighter-Style.xml
Last active December 20, 2015 12:19
<Sublime BracketHighlighter> Highlight Style Configuration (add this part config into your color theme file)
<!--BracketHighlighter-->
<dict>
<key>name</key>
<string>Bracket Unmatched</string>
<key>scope</key>
<string>brackethighlighter.unmatched</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#FF0000</string>
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@vitaLee
vitaLee / Default (OSX).sublime-keymap
Last active February 4, 2022 05:22
[Sublime Text] Enable resetting font size to a predefined default value.
[
{ "keys": ["super+0"], "command": "reset_font_size_to_user_defaults" }
]